Skip to content

Commit a8dc51e

Browse files
committed
Ubah src/functions/void - penamaan dan struktur
1 parent 690ccb6 commit a8dc51e

File tree

5 files changed

+41
-65
lines changed

5 files changed

+41
-65
lines changed

src/functions/void/func_void_comment.cpp

-21
This file was deleted.

src/functions/void/lib/func_void_log.h

-8
This file was deleted.

src/functions/void/src/func_void_log.cpp

-21
This file was deleted.

src/functions/void/src/func_void_main.cpp

-15
This file was deleted.

src/functions/void/src/void.cpp

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#include <iostream>
2+
3+
void tampilkanInfo(int data);
4+
void tampilkanInfo(bool data);
5+
void tampilkanInfo(double data);
6+
void tampilkanInfo(char data);
7+
void tampilkanInfo(std::string data);
8+
9+
int main() {
10+
tampilkanInfo("CPP Teaching Copyright (C) 2021 EmptyWork");
11+
tampilkanInfo("Hello World");
12+
tampilkanInfo('\n');
13+
tampilkanInfo('\u0057');
14+
tampilkanInfo('\n');
15+
tampilkanInfo(87);
16+
tampilkanInfo('\n');
17+
tampilkanInfo(4.5);
18+
tampilkanInfo('\n');
19+
tampilkanInfo(false);
20+
return 0;
21+
}
22+
23+
void tampilkanInfo(int data) {
24+
std::cout << data;
25+
}
26+
27+
void tampilkanInfo(bool data) {
28+
std::cout << data;
29+
}
30+
31+
void tampilkanInfo(double data) {
32+
std::cout << data;
33+
}
34+
35+
void tampilkanInfo(char data) {
36+
std::cout << data;
37+
}
38+
39+
void tampilkanInfo(std::string data) {
40+
std::cout << data;
41+
}

0 commit comments

Comments
 (0)