aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
diff options
context:
space:
mode:
authorprestonderek <[email protected]>2022-10-12 20:45:07 -0700
committerprestonderek <[email protected]>2022-10-12 20:45:07 -0700
commitf91d4065d8bdd393f5f3616f50773b61a7963fab (patch)
tree5e6e5562f7ef13369f23765af4fb4f44da4aa9ca /CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
parentran code at end of exersize 3. (diff)
downloadcst116-chapter8-debugging-prestonderek-f91d4065d8bdd393f5f3616f50773b61a7963fab.tar.xz
cst116-chapter8-debugging-prestonderek-f91d4065d8bdd393f5f3616f50773b61a7963fab.zip
Commit for change to for loop and finish of exersizes.
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;