aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan <[email protected]>2022-10-10 23:42:12 -0700
committerEvan <[email protected]>2022-10-10 23:42:12 -0700
commitcd794b16a777261f9d2a890c63daa62c469ef852 (patch)
tree0744a9a0dff7f9dcb9580e85bdfbe63f50c967e7
parent1 (diff)
downloadcst116-chapter8-debugging-evanmihm-cd794b16a777261f9d2a890c63daa62c469ef852.tar.xz
cst116-chapter8-debugging-evanmihm-cd794b16a777261f9d2a890c63daa62c469ef852.zip
2
-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 53e4a61..e5244bf 100644
--- a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
+++ b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
@@ -14,6 +14,9 @@
* 6) Step over the cout statement.
* 7) Why didn't the flow of the program return back to the while
* statement?
+*
+* The program is putting out the current value of i at that time
+*
* 8) Fix this problem by removing the ; after the while statement.
* 9) Stop debugging and repeat Steps 2 � 5 to verify the correction
* worked.
@@ -62,7 +65,7 @@ int main()
// Breakpoint 1
// Put a breakpoint on the following line
- while (i < 0);
+ while (i < 0)
cout << i << endl;
// Breakpoint 2