aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrenton Stark <[email protected]>2022-10-12 21:30:21 -0700
committerTrenton Stark <[email protected]>2022-10-12 21:30:21 -0700
commit5e7c140a93556f37a6cf5a634772018235605775 (patch)
tree74096804cdaf19852c24c2102ff77100da4feb98
parentCompleted exercise 3 (diff)
downloadcst116-ch8-debugging-stark-5e7c140a93556f37a6cf5a634772018235605775.tar.xz
cst116-ch8-debugging-stark-5e7c140a93556f37a6cf5a634772018235605775.zip
Completed exercise 4
-rw-r--r--CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
index 17875d1..e538fcb 100644
--- a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
+++ b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
@@ -51,7 +51,9 @@
* 3) Verify that the contents of count is garbage.
* 4) Step into the loop.
* 5) What is the value stored in count now?
+* 10
* 6) Where was 10 assigned to count?
+* During the for loop
* 7) Fix the problem and re-run to verify.
********************************************************************/
#include <iostream>
@@ -70,7 +72,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;