diff options
| author | tafaar <[email protected]> | 2022-10-18 14:32:59 -0700 |
|---|---|---|
| committer | tafaar <[email protected]> | 2022-10-18 14:32:59 -0700 |
| commit | a4ce3b5f21c117476795a71760d9b327002665de (patch) | |
| tree | 09a0d070534b91b20c4de61538e1d574f4af87a9 /CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp | |
| parent | answered 14 (diff) | |
| download | cst116-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.cpp | 5 |
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
|