diff options
| author | prestonderek <[email protected]> | 2022-10-21 10:17:33 -0700 |
|---|---|---|
| committer | prestonderek <[email protected]> | 2022-10-21 10:17:33 -0700 |
| commit | 641eb9c23e899cf8946630272945546992b0c89e (patch) | |
| tree | 6b6ed76d438151c743b0d807c999dcf938896999 | |
| parent | changed constant SIZE to 10 from 5 (diff) | |
| download | cst116-ch10-debugging-prestonderek-641eb9c23e899cf8946630272945546992b0c89e.tar.xz cst116-ch10-debugging-prestonderek-641eb9c23e899cf8946630272945546992b0c89e.zip | |
changed some literals to the const SIZE
| -rw-r--r-- | CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp index 928ddb2..a2831ed 100644 --- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp +++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp @@ -88,7 +88,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!
@@ -126,7 +126,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[])
|