diff --git a/03_FLOW_a/Testat/main_mp2_FLOW_a.cpp b/03_FLOW_a/Testat/main_mp2_FLOW_a.cpp index 4b4a451..62d9796 100644 --- a/03_FLOW_a/Testat/main_mp2_FLOW_a.cpp +++ b/03_FLOW_a/Testat/main_mp2_FLOW_a.cpp @@ -14,12 +14,20 @@ void help2(); -void recurse2(int i) { - if(i == 0) {help2(); return;} +void recurse2(int i, int rounds) { + if(i == 0 && rounds == 2) { + help2(); + } + else if(i == 0 && rounds == 1) { + recurse2(3, 0); + } + else + return; + PRINT;recurse2(i-1);return; } void help2() {PRINT; - //recurse2(3); + recurse2(3, 1); PRINT; } @@ -60,9 +68,20 @@ int main(int argc, const char * argv[]) { console.clearScreen(); currentColor = Colors::GREEN; - + + /* + * 1x Rekursion + * 1x Selektion + * 1x Subroutine + * + * 3x Aufrufe aus: + * 1x Rekursion + * 1x Hilfsfunktion + * 1x main + */ + //startA(); - recurse2(3); + recurse2(3, 2); std::string s; std::cin >> s; diff --git a/05_OO/build.sh b/05_OO/build.sh index b56fae7..4237857 100644 --- a/05_OO/build.sh +++ b/05_OO/build.sh @@ -1,3 +1,3 @@ #!/bin/bash clang++ -std=c++14 -o shape_main.out -I ../helpers/ shapes_main.cpp ../helpers/AnsiConsole.cpp -clang++ -std=c++14 -o ansiConsole.out -I ../helpers/ AnsiConsoleDemo.cpp ../helpers/AnsiConsole.cpp +clang++ -std=c++14 -o ansiConsole.out -I ../helpers/ AnsiConsoleDemo.cpp ../helpers/AnsiConsole.cpp \ No newline at end of file diff --git a/05_OO/main_mp4_OO_b.cpp b/05_OO/main_mp4_OO_b.cpp index 25160e8..2e6ee06 100644 --- a/05_OO/main_mp4_OO_b.cpp +++ b/05_OO/main_mp4_OO_b.cpp @@ -41,6 +41,25 @@ public: //======================================= +class Base { + int a; +public: + Base(int a) { + this.a = a; + } +}; + +class Derived : public Base{ + int b; +public: + Derived(int a, int b) { + Base::Base(a); + this.b = b; + } +}; + +//======================================= + FooVal::FooVal(int initialValue) : _someValue(initialValue) {