Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ryan: lab1 p1 and p2 #40

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions ryanlau/lab1_hard_project/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
9 changes: 9 additions & 0 deletions ryanlau/lab1_hard_project/include/hello_world.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef HELLOWORLD_H
#define HELLOWORLD_H

class HelloWorld {
public:
void hello();
};

#endif
6 changes: 6 additions & 0 deletions ryanlau/lab1_hard_project/src/hello_world.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "hello_world.h"
#include <iostream>

void HelloWorld::hello() {
std::cout << "Hello, World!\n";
}
7 changes: 7 additions & 0 deletions ryanlau/lab1_hard_project/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "hello_world.h"

int main() {
HelloWorld h;
h.hello();
return 0;
}
8 changes: 8 additions & 0 deletions ryanlau/lab1_medium_project/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
6 changes: 6 additions & 0 deletions ryanlau/lab1_medium_project/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <iostream>

int main()
{
std::cout << "Hello, World!\n";
}