This commit is contained in:
Johannes Theiner 2018-05-06 17:57:51 +02:00
parent 1a8ac4ec4a
commit 1fc56f7087
3 changed files with 44 additions and 6 deletions

View File

@ -14,12 +14,20 @@ void help2();
void recurse2(int i) { void recurse2(int i, int rounds) {
if(i == 0) {help2(); return;} if(i == 0 && rounds == 2) {
help2();
}
else if(i == 0 && rounds == 1) {
recurse2(3, 0);
}
else
return;
PRINT;recurse2(i-1);return; PRINT;recurse2(i-1);return;
} }
void help2() {PRINT; void help2() {PRINT;
//recurse2(3); recurse2(3, 1);
PRINT; PRINT;
} }
@ -60,9 +68,20 @@ int main(int argc, const char * argv[]) {
console.clearScreen(); console.clearScreen();
currentColor = Colors::GREEN; currentColor = Colors::GREEN;
/*
* 1x Rekursion
* 1x Selektion
* 1x Subroutine
*
* 3x Aufrufe aus:
* 1x Rekursion
* 1x Hilfsfunktion
* 1x main
*/
//startA(); //startA();
recurse2(3); recurse2(3, 2);
std::string s; std::string s;
std::cin >> s; std::cin >> s;

View File

@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
clang++ -std=c++14 -o shape_main.out -I ../helpers/ shapes_main.cpp ../helpers/AnsiConsole.cpp 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

View File

@ -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) FooVal::FooVal(int initialValue)
: _someValue(initialValue) : _someValue(initialValue)
{ {