aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
diff options
context:
space:
mode:
authorTrenton Stark <[email protected]>2022-10-12 21:23:24 -0700
committerTrenton Stark <[email protected]>2022-10-12 21:23:24 -0700
commitf0551cef4a0215b036fa5ba68779d0602a5af4f3 (patch)
treefd40b9caf45496bface1a4f533d2a6d555ddf7fa /CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
parentCompleted exercise 1 (diff)
downloadcst116-ch8-debugging-stark-f0551cef4a0215b036fa5ba68779d0602a5af4f3.tar.xz
cst116-ch8-debugging-stark-f0551cef4a0215b036fa5ba68779d0602a5af4f3.zip
Completed exercise 2
Diffstat (limited to 'CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp')
-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 8fd6948..8439556 100644
--- a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
+++ b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp
@@ -25,8 +25,10 @@
* 1) Run to Breakpoint 1.
* 2) Step into the while loop.
* 3) Why did the cout not execute?
+* 0 is not less than 0
* 4) Check the value of i, now check the condition, does the
* condition evaluate to true?
+* No
* 5) Change the "< 0" to a "< 10".
* 6) Stop debugging and repeat Steps 1 � 4 to verify the correction
* worked.
@@ -63,7 +65,7 @@ int main()
// Breakpoint 1
// Put a breakpoint on the following line
- while (i < 0)
+ while (i < 10)
cout << i << endl;
// Breakpoint 2