From e46a332efea3b28692b85599dfcca1b61e8d652c Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Mon, 12 Nov 2018 21:23:18 +0100 Subject: [PATCH] 05_OOb Vorbereitung auf Testat --- src/05_OO/a/MP/shapes_main.cpp | 2 +- src/05_OO/b/CMakeLists.txt | 8 ++------ src/05_OO/b/MP/main_mp4_OO_b.cpp | 14 ++++++++++++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/05_OO/a/MP/shapes_main.cpp b/src/05_OO/a/MP/shapes_main.cpp index 20dbcde..2c96230 100644 --- a/src/05_OO/a/MP/shapes_main.cpp +++ b/src/05_OO/a/MP/shapes_main.cpp @@ -31,4 +31,4 @@ int main(int argc, char **argv) { return 0; -} +} \ No newline at end of file diff --git a/src/05_OO/b/CMakeLists.txt b/src/05_OO/b/CMakeLists.txt index 336b04e..9151e31 100644 --- a/src/05_OO/b/CMakeLists.txt +++ b/src/05_OO/b/CMakeLists.txt @@ -1,7 +1,3 @@ -add_executable(05_OOb_MP - MP/main_mp4_OO_b.cpp - ) +add_executable(05_OOb_MP MP/main_mp4_OO_b.cpp) -add_executable(05_OOb_Testat - Testat/main_mp4_OO_b.cpp - ) \ No newline at end of file +add_executable(05_OOb_Testat Testat/main_mp4_OO_b.cpp) \ No newline at end of file diff --git a/src/05_OO/b/MP/main_mp4_OO_b.cpp b/src/05_OO/b/MP/main_mp4_OO_b.cpp index 8eda322..907263c 100644 --- a/src/05_OO/b/MP/main_mp4_OO_b.cpp +++ b/src/05_OO/b/MP/main_mp4_OO_b.cpp @@ -185,10 +185,18 @@ void pattern2() { B b; C c; A a; - } - +void pattern3() { + A a1; + { + A a2; + { + B b; + } + C c; + } +} int main(int argc, const char * argv[]) { @@ -212,6 +220,8 @@ int main(int argc, const char * argv[]) { pattern1(); std::cout << std::endl; pattern2(); + std::cout << std::endl; + pattern3(); return 0; }