diff options
| author | Kai <[email protected]> | 2022-10-19 19:54:03 -0700 |
|---|---|---|
| committer | Kai <[email protected]> | 2022-10-19 19:54:03 -0700 |
| commit | e11b49849c6438bb9d71c33eb797bf58bb0b3df4 (patch) | |
| tree | 8e1fc5d06812a79746422f1f11bba17e87ad83c0 /CST116-Ch9-Debugging | |
| parent | age (diff) | |
| download | cst116-ch9-debugging-cobrakai2-main.tar.xz cst116-ch9-debugging-cobrakai2-main.zip | |
Diffstat (limited to 'CST116-Ch9-Debugging')
| -rw-r--r-- | CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp b/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp index 274a455..f58bbe7 100644 --- a/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp +++ b/CST116-Ch9-Debugging/CST116-Ch9-Debugging.cpp @@ -15,7 +15,7 @@ * 6) Step Into the code for the function GetAge.
* 7) The execution continues to the function header for GetAge.
* 8) Step into one more time.
-* 9) Why did the address of age and value change? Im guessing something to do with me not inputing something or something storage related.
+* 9) Why did the address of age and value change? Age wasnt assigned to the get age variable.
* 10) Step over the cout and cin statements.
* 11) Verify the value entered is stored properly in age.
* 12) Step into until the flow returns to main.
@@ -35,7 +35,7 @@ * 3) Step into CalcDays.
* 4) Step into one more time so that the current line is the
* calculation.
-* 5) Why is age greyed out in your watch window?
+* 5) Why is age greyed out in your watch window? Because they are no longer in the scope of the function.
* 6) Stop debugging.
*
* Debugging Exercise 3
@@ -83,7 +83,7 @@ int main() // Breakpoint 2
// Put breakpoint on the following line
- PrintResults(age, days);
+ PrintResults(days, age);
return 0;
}
|