diff options
19 files changed, 21 insertions, 4 deletions
@@ -3,3 +3,4 @@ ################################################################################ /.vs/cst116-ch7-debugging-Smith-Benjamin/v17 +/CST116-Ch7-Debugging/.vs/CST116-Ch7-Debugging diff --git a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp index f64adfe..b97eb32 100644 --- a/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp +++ b/CST116-Ch7-Debugging/CST116-Ch7-Debugging.cpp @@ -13,6 +13,7 @@ * the value in age is what you typed in.
* 5) Step over the if statement.
* 6) Why did the value in age change?
+* It used the = in the if statement instead of ==, which changed the value rather than check it
* 7) Fix the problem and repeat Steps 2 � 5 to verify the
* problem was corrected.
* 8) Stop debugging.
@@ -26,6 +27,7 @@ * 4) Verify that 25 is still stored in age.
* 5) Step over the else if.
* 6) Why is the program going to print "Teenager" for an age of 25?
+* It's checking for values less than or equal to 19 OR greater than or equal to 12, which is all real numbers
* 7) Fix the problem and repeat Steps 1 � 5 to verify the
* problem was corrected.
* 8) Stop debugging.
@@ -43,9 +45,7 @@ ********************************************************************/
#include <iostream>
-using std::cout;
-using std::endl;
-using std::cin;
+using namespace std;
int main()
{
@@ -56,7 +56,7 @@ int main() // Breakpoint 1
// Put a breakpoint on the following line
- if (age = 1)
+ if (age == 1)
cout << "First Birthday" << endl;
else if (age >= 12 || age <= 19)
cout << "Teenager" << endl;
diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/CL.command.1.tlog b/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/CL.command.1.tlog Binary files differnew file mode 100644 index 0000000..e3ce30e --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/CL.command.1.tlog diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/CL.read.1.tlog b/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/CL.read.1.tlog Binary files differnew file mode 100644 index 0000000..7ad9e91 --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/CL.read.1.tlog diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/CL.write.1.tlog b/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/CL.write.1.tlog Binary files differnew file mode 100644 index 0000000..ce7b676 --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/CL.write.1.tlog diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/CST116-Ch7-Debugging.lastbuildstate b/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/CST116-Ch7-Debugging.lastbuildstate new file mode 100644 index 0000000..9b9b566 --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/CST116-Ch7-Debugging.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.33.31629:TargetPlatformVersion=10.0.19041.0: +Debug|x64|C:\Users\cowpi\Source\Repos\cst116-ch7-debugging-Smith-Benjamin\CST116-Ch7-Debugging\| diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/link.command.1.tlog b/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/link.command.1.tlog Binary files differnew file mode 100644 index 0000000..727f649 --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/link.command.1.tlog diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/link.read.1.tlog b/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/link.read.1.tlog Binary files differnew file mode 100644 index 0000000..4391d2c --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/link.read.1.tlog diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/link.write.1.tlog b/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/link.write.1.tlog Binary files differnew file mode 100644 index 0000000..728ed3a --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/CST116-C.b0d44148.tlog/link.write.1.tlog diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.exe b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.exe Binary files differnew file mode 100644 index 0000000..afab05c --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.exe diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.exe.recipe b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.exe.recipe new file mode 100644 index 0000000..3b9bbd8 --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.exe.recipe @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> + <ProjectOutputs> + <ProjectOutput> + <FullPath>C:\Users\cowpi\Source\Repos\cst116-ch7-debugging-Smith-Benjamin\CST116-Ch7-Debugging\x64\Debug\CST116-Ch7-Debugging.exe</FullPath> + </ProjectOutput> + </ProjectOutputs> + <ContentFiles /> + <SatelliteDlls /> + <NonRecipeFileRefs /> +</Project>
\ No newline at end of file diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.ilk b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.ilk Binary files differnew file mode 100644 index 0000000..cfa1815 --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.ilk diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.log b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.log new file mode 100644 index 0000000..ddd352b --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.log @@ -0,0 +1,2 @@ + CST116-Ch7-Debugging.cpp + CST116-Ch7-Debugging.vcxproj -> C:\Users\cowpi\Source\Repos\cst116-ch7-debugging-Smith-Benjamin\CST116-Ch7-Debugging\x64\Debug\CST116-Ch7-Debugging.exe diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.obj b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.obj Binary files differnew file mode 100644 index 0000000..755e060 --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.obj diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.pdb b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.pdb Binary files differnew file mode 100644 index 0000000..ea61d89 --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.pdb diff --git a/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.vcxproj.FileListAbsolute.txt b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..fc531f2 --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/CST116-Ch7-Debugging.vcxproj.FileListAbsolute.txt @@ -0,0 +1 @@ +C:\Users\cowpi\source\repos\cst116-ch7-debugging-Smith-Benjamin\CST116-Ch7-Debugging\x64\Debug\CST116-Ch7-Debugging.exe diff --git a/CST116-Ch7-Debugging/x64/Debug/cst116-ch7-debugging.obj.enc b/CST116-Ch7-Debugging/x64/Debug/cst116-ch7-debugging.obj.enc Binary files differnew file mode 100644 index 0000000..cf67e3d --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/cst116-ch7-debugging.obj.enc diff --git a/CST116-Ch7-Debugging/x64/Debug/vc143.idb b/CST116-Ch7-Debugging/x64/Debug/vc143.idb Binary files differnew file mode 100644 index 0000000..d4e4ec2 --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/vc143.idb diff --git a/CST116-Ch7-Debugging/x64/Debug/vc143.pdb b/CST116-Ch7-Debugging/x64/Debug/vc143.pdb Binary files differnew file mode 100644 index 0000000..adeedf7 --- /dev/null +++ b/CST116-Ch7-Debugging/x64/Debug/vc143.pdb |