aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp')
-rw-r--r--CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
index 22e48f5..752eecc 100644
--- a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
+++ b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
@@ -57,6 +57,9 @@
//Ran the program at start of Exersize 3 and it's infinite 0's!!!
//added a ++ to i in the cout statement after closing the infinite program.
//ran to breakpoint 2 and the output is 0-9.
+//ran code through the for loop and it only showed me count at 10. This is wrong.
+//found that the for loop was closing with a ; before anything else could happen other than count going up.
+//code functions as it should now.
#include <iostream>
using std::cout;
@@ -74,7 +77,7 @@ int main()
// Breakpoint 2
// Put a breakpoint on the following line
- for (count = 0; count < 10; count++);
+ for (count = 0; count < 10; count++)
cout << count << endl;
return 0;