aboutsummaryrefslogtreecommitdiff
path: root/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp
diff options
context:
space:
mode:
authortafaar <[email protected]>2022-10-18 14:32:59 -0700
committertafaar <[email protected]>2022-10-18 14:32:59 -0700
commita4ce3b5f21c117476795a71760d9b327002665de (patch)
tree09a0d070534b91b20c4de61538e1d574f4af87a9 /CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp
parentanswered 14 (diff)
downloadcst116-ch9-debugging-hill-a4ce3b5f21c117476795a71760d9b327002665de.tar.xz
cst116-ch9-debugging-hill-a4ce3b5f21c117476795a71760d9b327002665de.zip
answered 2.5
Diffstat (limited to 'CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp')
-rw-r--r--CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp b/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp
index 1f65cf3..1653a98 100644
--- a/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp
+++ b/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp
@@ -42,6 +42,9 @@
* 4) Step into one more time so that the current line is the
* calculation.
* 5) Why is age greyed out in your watch window?
+*
+* Because age is a local variable to main
+*
* 6) Stop debugging.
*
* Debugging Exercise 3
@@ -83,7 +86,7 @@ int main()
// Breakpoint 1
// Put breakpoint on the following line
- GetAge();
+ age = GetAge();
days = CalcDays(age);
// Breakpoint 2