diff --git a/03_FLOW_a/build.sh b/03_FLOW_a/build.sh old mode 100644 new mode 100755 index 9093d33..f01dc81 --- a/03_FLOW_a/build.sh +++ b/03_FLOW_a/build.sh @@ -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 diff --git a/03_FLOW_a/flow.out b/03_FLOW_a/flow.out new file mode 100755 index 0000000..9c7cb79 Binary files /dev/null and b/03_FLOW_a/flow.out differ diff --git a/03_FLOW_a/main_mp2_FLOW_a.cpp b/03_FLOW_a/main_mp2_FLOW_a.cpp index dd18cd6..4811c4c 100644 --- a/03_FLOW_a/main_mp2_FLOW_a.cpp +++ b/03_FLOW_a/main_mp2_FLOW_a.cpp @@ -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;