From 171f49d9a10c0da232f68cf592e9e35ca1a55370 Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Mon, 18 Jun 2018 15:24:01 +0200 Subject: [PATCH] welp --- 11_PUTT/Test.cpp | 11 ++++++++--- 11_PUTT/Test.h | 13 ++++++++++++- CMakeLists.txt | 37 +++++++++++++------------------------ 3 files changed, 33 insertions(+), 28 deletions(-) diff --git a/11_PUTT/Test.cpp b/11_PUTT/Test.cpp index d5e180d..d6cc256 100644 --- a/11_PUTT/Test.cpp +++ b/11_PUTT/Test.cpp @@ -4,8 +4,13 @@ #include "Test.h" -char *s = "1.0"; -auto b = s; -auto a = s[2]; + +int main() { + Derived * derived = new Derived(); + + bar(derived); + + delete derived; +} \ No newline at end of file diff --git a/11_PUTT/Test.h b/11_PUTT/Test.h index e30758c..2ae9d51 100644 --- a/11_PUTT/Test.h +++ b/11_PUTT/Test.h @@ -6,9 +6,20 @@ #define TEST_BUILD_TEST_H -class Test { +class Base { }; +class Derived : Base { +}; + +void foo(Base* base) { + +} + +void bar(Derived* derived) { + +} + #endif //TEST_BUILD_TEST_H diff --git a/CMakeLists.txt b/CMakeLists.txt index a4cf71d..d433ab1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,31 +3,20 @@ project(test_build) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") -set(UDEF_1 UserDefinedTypes1) -set(UDEF_1_SOURCE 04_UDEF/main_04_UDEF_e.cpp) -add_executable(${UDEF_1} ${UDEF_1_SOURCE}) - -set(UDEF_2 UserDefinedTypes2) -set(UDEF_2_SOURCE 04_UDEF/main_04_UDEF_a.cpp) -add_executable(${UDEF_2} ${UDEF_2_SOURCE}) - -set(UDEF_TESTAT UserDefinedTypesTestat) -set(UDEF_TESTAT_SOURCE 04_UDEF/Testat/Testat.cpp) -add_executable(${UDEF_TESTAT} ${UDEF_TESTAT_SOURCE}) - -set(05_SHAPES 05_Shapes) -set(05_SHAPES_SOURCE 05_OO/shapes_main.cpp) -add_executable(${05_SHAPES} helpers/AnsiConsole.cpp ${05_SHAPES_SOURCE}) +add_executable(UDEF_1 04_UDEF/main_04_UDEF_e.cpp) +add_executable(UDEF_2 04_UDEF/main_04_UDEF_a.cpp) +add_executable(UDEF_Testat 04_UDEF/Testat/Testat.cpp) -set(SEQUENCE_DIAGRAM SequenzDiagram) -set(SEQUENCE_DIAGRAM_SOURCE 11_PUTT/05_OO_b/main.cpp) -add_executable(${SEQUENCE_DIAGRAM} 11_PUTT/05_OO_b/SequenceDiagramCreator.cpp ${SEQUENCE_DIAGRAM_SOURCE}) +add_executable(OO_A 05_OO/main_mp4_OO_a_vehicles.cpp) +add_executable(OO_B 05_OO/main_mp4_OO_b.cpp) -set(LCDDISPLAY LCDDisplay) -set(LCDDISPLAY_SOURCE 11_PUTT/02_Ment/LCDDisplay.cpp) -add_executable(${LCDDISPLAY} ${LCDDISPLAY_SOURCE}) +add_executable(OO_Shapes 05_OO/shapes_main.cpp) -set(COPY_ON_WRITE CopyOnWrite) -set(COPY_ON_WRITE_SOURCE 11_PUTT/CopyOnWrite/main.cpp) -add_executable(${COPY_ON_WRITE} 11_PUTT/CopyOnWrite/OneByOneMatrix.cpp 11_PUTT/CopyOnWrite/LargeCowMatrix.cpp ${COPY_ON_WRITE_SOURCE}) \ No newline at end of file +add_executable(SequenceDiagram 11_PUTT/05_OO_b/SequenceDiagramCreator.cpp 11_PUTT/05_OO_b/main.cpp) + +add_executable(LCDDisplay 11_PUTT/02_Ment/LCDDisplay.cpp) + +add_executable(CopyOnWrite 11_PUTT/CopyOnWrite/OneByOneMatrix.cpp 11_PUTT/CopyOnWrite/LargeCowMatrix.cpp 11_PUTT/CopyOnWrite/main.cpp) + +#add_executable(Test 11_PUTT/Test.cpp) \ No newline at end of file