From c76b093be94016ac2bd5b329ce60fe7e372349fd Mon Sep 17 00:00:00 2001 From: tafaar Date: Tue, 25 Oct 2022 12:41:48 -0700 Subject: changed 5s to size and size to 10 --- CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp') diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp index 7108569..97122dd 100644 --- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp +++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp @@ -35,6 +35,9 @@ * 2) Change any literal containing a 5 to the constant SIZE. * Notice the usefulness of the constant when changes need * to be made to your code. +* +* Done +* * 3) Set a breakpoint at Breakpoint 4. Now on this breakpoint * set the necessary condition so the loop breaks when x hits 8. * (Hint: If you need help setting breakpoints based upon a @@ -87,11 +90,11 @@ void FunctionTwo(const int varX[], const int varY[], int varZ[]); void PrintFunction(const int varX[], const int varY[], const int varZ[]); -const int SIZE = 5; +const int SIZE = 10; int main() { - int varX[5]; + int varX[SIZE]; int varY[SIZE]; int varZ[SIZE]; // Notice how we used the const here! @@ -129,7 +132,7 @@ void FunctionOne(int varX[], int varY[]) // Put breakpoint on the following line varX[x] = x; - for (int x = 0; x < 5; x++) + for (int x = 0; x < SIZE; x++) varY[x] = x + 100; } void FunctionTwo(const int varX[], const int varY[], int varZ[]) -- cgit v1.2.3