aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp15
-rw-r--r--CST116-Ch10-Debugging/CST116-Ch10Debugging-Crawford-Pseudocode.txt19
2 files changed, 30 insertions, 4 deletions
diff --git a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp
index 1e3d58b..e31c769 100644
--- a/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp
+++ b/CST116-Ch10-Debugging/CST116-Ch10-Debugging.cpp
@@ -84,11 +84,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!
@@ -131,11 +131,17 @@ void FunctionOne(int varX[], int varY[])
}
void FunctionTwo(const int varX[], const int varY[], int varZ[])
{
+}
+void PrintFunction(const int varX[], const int varY[], const int varZ[])
+{
+}
+void FunctionTwo(const int varX[], const int varY[], int varZ[]) {
+{
for (int x = 0; x < SIZE; x++) // Notice the const SIZE here
- varZ[x] = varX[x] + varY[x];
+ varZ[-99] = varX[x] + varY[x];
}
void PrintFunction(const int varX[20], const int varY[20],
- const int varZ[20])
+ const int varZ[20]);
{
int x;
@@ -146,3 +152,4 @@ void PrintFunction(const int varX[20], const int varY[20],
<< "\t " << varY[x]
<< "\t " << varZ[x] << endl;
}
+
diff --git a/CST116-Ch10-Debugging/CST116-Ch10Debugging-Crawford-Pseudocode.txt b/CST116-Ch10-Debugging/CST116-Ch10Debugging-Crawford-Pseudocode.txt
new file mode 100644
index 0000000..e66ea6a
--- /dev/null
+++ b/CST116-Ch10-Debugging/CST116-Ch10Debugging-Crawford-Pseudocode.txt
@@ -0,0 +1,19 @@
+Pseudo Code
+Debugging Exercise 1
+-Set Breakpoints at Points 1,2,&3
+- Placed 4 watch's on varX, varY, varZ, and name
+-watched the results,went through program. Completed Exersize 1
+
+Debugging Exersize 2
+-Constant size 10, all literals now SIZE
+- At breakpoint 4 I set the proper conditions for the loop to break after 8 cycles
+- Keep having coding issues where it wont run the program due to a code C2084 & MSB6003
+-Fixed error.
+-Contents of varX: + varX 0x000000634f2ff838 {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} int[10]
+-Contents of varY: + varY 0x000000634f2ff878 {100, 101, 102, 103, 104, -858993460, -858993460, -858993460, -858993460, -858993460} int[10]
+-Ended debugging and continued.
+
+Debugging Exersize 3
+Due to medical disability and mental exhaustion I was unable to finish this point of the assignment. It is 9:42 at night,
+and I just can't figure this. One could say " I could just ask" well i'm not freshout of highschool and I'm already battered enough
+from my time in the ARMY. Have a good Good night! \ No newline at end of file