diff options
| author | Musa Ahmed <[email protected]> | 2022-10-19 13:25:36 -0700 |
|---|---|---|
| committer | Musa Ahmed <[email protected]> | 2022-10-19 13:25:36 -0700 |
| commit | 42717cae743c96bb43999576b68c0f59e6b14ab5 (patch) | |
| tree | 5f2809ec0e760647b10653324db89737eee293d8 /CST116-Ch9-Debugging-Ahmed/CST116-Ch9-Debugging-Ahmed.cpp | |
| parent | rename (diff) | |
| download | cst116-ch9-debugging-m005a-42717cae743c96bb43999576b68c0f59e6b14ab5.tar.xz cst116-ch9-debugging-m005a-42717cae743c96bb43999576b68c0f59e6b14ab5.zip | |
did debugging exercises
Diffstat (limited to 'CST116-Ch9-Debugging-Ahmed/CST116-Ch9-Debugging-Ahmed.cpp')
| -rw-r--r-- | CST116-Ch9-Debugging-Ahmed/CST116-Ch9-Debugging-Ahmed.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/CST116-Ch9-Debugging-Ahmed/CST116-Ch9-Debugging-Ahmed.cpp b/CST116-Ch9-Debugging-Ahmed/CST116-Ch9-Debugging-Ahmed.cpp index 4182b54..beb37f6 100644 --- a/CST116-Ch9-Debugging-Ahmed/CST116-Ch9-Debugging-Ahmed.cpp +++ b/CST116-Ch9-Debugging-Ahmed/CST116-Ch9-Debugging-Ahmed.cpp @@ -40,6 +40,7 @@ * 4) Step into one more time so that the current line is the * calculation. * 5) Why is age greyed out in your watch window? +* It's not greyed out. I followed every step but its not greyed out for me * 6) Stop debugging. * * Debugging Exercise 3 @@ -51,6 +52,8 @@ * 4) Step into the PrintResults function. * 5) Age is 7300? Not even Ralph is that old. * 6) Why did the values for both variables change? +* in the function we have the order for age and days reversed, reversing them fixes +* the error * 7) Stop debugging and fix the error. * * Debugging Exercise 4 @@ -109,7 +112,7 @@ int CalcDays(int years) return days; } -void PrintResults(int days, int age) +void PrintResults(int age, int days) { cout << age << "! Boy are you old!\n"; cout << "Did you know that you are at least " << days << " days old?\n\n"; |