From 63269baf32e83b7285ef2f8ae70cbb1a76a6791c Mon Sep 17 00:00:00 2001 From: Robert Ulmer Date: Tue, 29 Oct 2024 13:06:03 +0100 Subject: [PATCH] try to tidy up --- src/libraries/Echo/echo.cpp | 6 ++---- src/programs/hello_c/main.c | 4 +--- src/programs/hello_world/hello.cpp | 4 ++-- src/programs/hello_world/main.cpp | 8 +++++--- src/programs/say_hello/main.cpp | 3 ++- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/libraries/Echo/echo.cpp b/src/libraries/Echo/echo.cpp index e45c044..d9d8ecb 100644 --- a/src/libraries/Echo/echo.cpp +++ b/src/libraries/Echo/echo.cpp @@ -1,10 +1,8 @@ +#include "include/echo.h" #include -#include "echo.h" void echo(std::string echo_string) { std::cout << "The echo says " << echo_string << std::endl; } -void echo2() { - echo("2"); -} +void echo2() { echo("2"); } diff --git a/src/programs/hello_c/main.c b/src/programs/hello_c/main.c index d91e941..e42ba5c 100644 --- a/src/programs/hello_c/main.c +++ b/src/programs/hello_c/main.c @@ -1,5 +1,3 @@ #include -int main(int argc, char** argv) { - printf("Hello World!\n"); -} +int main(int argc, char **argv) { printf("Hello World!\n"); } diff --git a/src/programs/hello_world/hello.cpp b/src/programs/hello_world/hello.cpp index b4cf89a..a329d0b 100644 --- a/src/programs/hello_world/hello.cpp +++ b/src/programs/hello_world/hello.cpp @@ -1,8 +1,8 @@ -#include #include -#include "hello.h" +#include "include/hello.h" void say_hello() { + // not found header echo("Hello World!"); } diff --git a/src/programs/hello_world/main.cpp b/src/programs/hello_world/main.cpp index 294bd9e..26d1c33 100644 --- a/src/programs/hello_world/main.cpp +++ b/src/programs/hello_world/main.cpp @@ -1,7 +1,9 @@ -#include "hello.h" +#include "include/hello.h" // #include -#include +// #include + +int main(int argc, char **argv) { + // ahoi -int main(int argc, char** argv) { say_hello(); } diff --git a/src/programs/say_hello/main.cpp b/src/programs/say_hello/main.cpp index 4e12642..2572c9b 100644 --- a/src/programs/say_hello/main.cpp +++ b/src/programs/say_hello/main.cpp @@ -1,5 +1,6 @@ #include -int main(int argc, char ** argv) { +int main(int argc, char **argv) { + // just for info std::cerr << "Hello" << std::endl; }