diff options
| author | Morgan Cyrus <[email protected]> | 2022-10-30 11:15:57 -0700 |
|---|---|---|
| committer | Morgan Cyrus <[email protected]> | 2022-10-30 11:15:57 -0700 |
| commit | 27722aef2729dc79d15a96492c4e4f9192d0fcd1 (patch) | |
| tree | 838bc3b490c700a0955f17e53394369ea89e0b38 | |
| parent | changed constant to 10 (diff) | |
| download | cst116-ch10-debugging-cyrus-27722aef2729dc79d15a96492c4e4f9192d0fcd1.tar.xz cst116-ch10-debugging-cyrus-27722aef2729dc79d15a96492c4e4f9192d0fcd1.zip | |
changed to SIZE
| -rw-r--r-- | CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp index 4096fdd..70c9288 100644 --- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp +++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp @@ -51,10 +51,13 @@ /* Debugging Exercise 2
*
* 1) Change the constant SIZE from 5 to 10.
+* done
*
* 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.
+*
+*
* 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
@@ -112,7 +115,7 @@ 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!
@@ -150,7 +153,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[])
|