aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
diff options
context:
space:
mode:
authorTrenton Stark <[email protected]>2022-10-12 21:20:42 -0700
committerTrenton Stark <[email protected]>2022-10-12 21:20:42 -0700
commitd70db0c84b86258eb6d16efb1724f2597b85b7cb (patch)
tree9db7f18e6e132de1047b8f336bc26115a9b07e92 /CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
parentInitial commit (diff)
downloadcst116-ch8-debugging-stark-d70db0c84b86258eb6d16efb1724f2597b85b7cb.tar.xz
cst116-ch8-debugging-stark-d70db0c84b86258eb6d16efb1724f2597b85b7cb.zip
Completed exercise 1
Diffstat (limited to 'CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp')
-rw-r--r--CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
index 53e4a61..8fd6948 100644
--- a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
+++ b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
@@ -14,6 +14,7 @@
* 6) Step over the cout statement.
* 7) Why didn't the flow of the program return back to the while
* statement?
+* The ; after the while statement breaks to loop, cout should not have run because 0 is not less than 0
* 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 +63,7 @@ int main()
// Breakpoint 1
// Put a breakpoint on the following line
- while (i < 0);
+ while (i < 0)
cout << i << endl;
// Breakpoint 2