MP_03 Verständnisfrage

This commit is contained in:
Johannes Theiner 2018-03-27 21:54:10 +02:00
parent 81222a26f9
commit df99b0273a
3 changed files with 35 additions and 1 deletions

5
03_FLOW_a/build.sh Normal file → Executable file
View File

@ -1,2 +1,5 @@
#!/bin/bash
clang++ -std=c++14 -I ../helpers -o flow.out main_mp2_FLOW_a.cpp ../helpers/AnsiConsole.cpp
rm *.out
clang++-6.0 -std=c++14 -I ../helpers -o flow.out main_mp2_FLOW_a.cpp ../helpers/AnsiConsole.cpp
./flow.out

BIN
03_FLOW_a/flow.out Executable file

Binary file not shown.

View File

@ -20,6 +20,26 @@ void recurse(int turns){
}
void test_Iteration() {
INITPRINT("Test Iteration");
int array[6] = {};
for(int i = 0; i <= 6; i++) {
PRINT; array[i] = 0;
}
}
void test() {
INITPRINT("Test");
int array[6] = {};
PRINT; array[0] = 0;
PRINT; array[1] = 0;
PRINT; array[2] = 0;
PRINT; array[3] = 0;
PRINT; array[4] = 0;
PRINT; array[5] = 0;
}
@ -100,6 +120,7 @@ int func_1(int arg){
int main(int argc, const char * argv[]) {
console.clearScreen();
currentColor = Colors::BLUE;
start_Sequence();
currentColor = Colors::RED;
@ -116,6 +137,16 @@ int main(int argc, const char * argv[]) {
//start_interrupt();
//start_coroutine();
//start_exception();
currentColor = Colors::WHITE;
test_Iteration();
currentColor = Colors::MAGENTA;
test();
std::string s;
std::cin >> s;