diff options
Diffstat (limited to 'CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp')
| -rw-r--r-- | CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp index e9300c0..13790cb 100644 --- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp +++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp @@ -87,7 +87,7 @@ void PrintFunction(const int varX[], const int varY[], const int SIZE = 10;//changed from 5 to 10
int main()
-{
+{
int varX[SIZE]; //changed all 5s to SIZE
int varY[SIZE];
int varZ[SIZE]; // Notice how we used the const here!
@@ -100,6 +100,8 @@ int main() // Breakpoint 3
// Put breakpoint on the following line
FunctionTwo(varX, varY, varZ);
+ varX[1] = 99; //assigning varX so that the 2nd placement/element is 99
+ varZ[0] = -99; //assigning varZ so that the 1st placement is -99
PrintFunction(varX, varY, varZ);
return 0;
|