From a4ce3b5f21c117476795a71760d9b327002665de Mon Sep 17 00:00:00 2001 From: tafaar Date: Tue, 18 Oct 2022 14:32:59 -0700 Subject: answered 2.5 --- CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp') 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 -- cgit v1.2.3