aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoolyBoi <[email protected]>2022-10-26 21:27:52 -0700
committerDoolyBoi <[email protected]>2022-10-26 21:27:52 -0700
commitb2a8ecc6c79d827ad7aa936d805c6d50e2be4c27 (patch)
treee561d3265278bd497ae842d377901f8c739fe9c8
parentdebugging exercise 1 complete (diff)
downloadcst116-ch10-debugging-abd00l4h-b2a8ecc6c79d827ad7aa936d805c6d50e2be4c27.tar.xz
cst116-ch10-debugging-abd00l4h-b2a8ecc6c79d827ad7aa936d805c6d50e2be4c27.zip
Completed Debugging exercise 2
-rw-r--r--CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp
index 2527921..7043d3d 100644
--- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp
+++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp
@@ -85,11 +85,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!
@@ -122,12 +122,12 @@ void GetAndDisplayWelcomeInfo()
}
void FunctionOne(int varX[], int varY[])
{
- for (int x = 0; x < SIZE; x++) // NOTICE '<' NOT <=
+ for (int x = 0; x < 8; x++) // NOTICE '<' NOT <=
// Breakpoint 4
// 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[])