diff --git a/ryanlau/lab1_hard_project/CMakeLists.txt b/ryanlau/lab1_hard_project/CMakeLists.txt new file mode 100644 index 0000000..76eab66 --- /dev/null +++ b/ryanlau/lab1_hard_project/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.15...3.30) + +project( + HW1_PART2 + VERSION 1.0 + LANGUAGES CXX) + +add_library(HelloWorldLib src/hello_world.cpp) +target_include_directories(HelloWorldLib PUBLIC include) + +add_executable(HelloWorld src/main.cpp) + +target_link_libraries(HelloWorld PRIVATE HelloWorldLib) diff --git a/ryanlau/lab1_hard_project/include/hello_world.h b/ryanlau/lab1_hard_project/include/hello_world.h new file mode 100644 index 0000000..97bab6d --- /dev/null +++ b/ryanlau/lab1_hard_project/include/hello_world.h @@ -0,0 +1,9 @@ +#ifndef HELLOWORLD_H +#define HELLOWORLD_H + +class HelloWorld { + public: + void hello(); +}; + +#endif diff --git a/ryanlau/lab1_hard_project/src/hello_world.cpp b/ryanlau/lab1_hard_project/src/hello_world.cpp new file mode 100644 index 0000000..56b51c3 --- /dev/null +++ b/ryanlau/lab1_hard_project/src/hello_world.cpp @@ -0,0 +1,6 @@ +#include "hello_world.h" +#include + +void HelloWorld::hello() { + std::cout << "Hello, World!\n"; +} diff --git a/ryanlau/lab1_hard_project/src/main.cpp b/ryanlau/lab1_hard_project/src/main.cpp new file mode 100644 index 0000000..eecd6c8 --- /dev/null +++ b/ryanlau/lab1_hard_project/src/main.cpp @@ -0,0 +1,7 @@ +#include "hello_world.h" + +int main() { + HelloWorld h; + h.hello(); + return 0; +} diff --git a/ryanlau/lab1_medium_project/CMakeLists.txt b/ryanlau/lab1_medium_project/CMakeLists.txt new file mode 100644 index 0000000..386fa8e --- /dev/null +++ b/ryanlau/lab1_medium_project/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15...3.30) + +project( + HW1_PART1 + VERSION 1.0 + LANGUAGES CXX) + +add_executable(HelloWorld src/main.cpp) diff --git a/ryanlau/lab1_medium_project/src/main.cpp b/ryanlau/lab1_medium_project/src/main.cpp new file mode 100644 index 0000000..a84136b --- /dev/null +++ b/ryanlau/lab1_medium_project/src/main.cpp @@ -0,0 +1,6 @@ +#include + +int main() +{ + std::cout << "Hello, World!\n"; +}