Skip to content

Commit b19f46c

Browse files
committed
Refactor C++ code
1 parent 98f408c commit b19f46c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

hello_world.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
#include <cstdlib>
22
#include <iostream>
33

4+
std::string message() {
5+
return "Hello, Danger world!";
6+
}
7+
48
int main() {
5-
std::cout << "Hello, Danger world!" << std::endl;
9+
std::cout << message() << std::endl;
610
return EXIT_SUCCESS;
711
}

0 commit comments

Comments
 (0)