diff options
| author | Joseph Williams <[email protected]> | 2022-10-06 15:05:23 -0700 |
|---|---|---|
| committer | Joseph Williams <[email protected]> | 2022-10-06 15:05:23 -0700 |
| commit | 61c606c2931719c2414f5c23106dd46961af956d (patch) | |
| tree | 636b16e8623a3f83b1c173f58fbfe8d604783e2f | |
| parent | Initial commit (diff) | |
| download | cst116-chapter8-debugging-allthenamesaretaken3141-main.tar.xz cst116-chapter8-debugging-allthenamesaretaken3141-main.zip | |
27 files changed, 38 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a3204dd --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +################################################################################ +# This .gitignore file was automatically created by Microsoft(R) Visual Studio. +################################################################################ + +*.opendb diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..eb8fe77 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,7 @@ +{ + "ExpandedNodes": [ + "" + ], + "SelectedNode": "\\CST116-Ch8-Debugging.sln", + "PreviewInSolutionExplorer": false +}
\ No newline at end of file diff --git a/.vs/cst116-chapter8-debugging-AllTheNamesAreTaken3141/v17/.suo b/.vs/cst116-chapter8-debugging-AllTheNamesAreTaken3141/v17/.suo Binary files differnew file mode 100644 index 0000000..c93561d --- /dev/null +++ b/.vs/cst116-chapter8-debugging-AllTheNamesAreTaken3141/v17/.suo diff --git a/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/FileContentIndex/1130880f-1d04-409a-a90b-bdb3676cc40e.vsidx b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/FileContentIndex/1130880f-1d04-409a-a90b-bdb3676cc40e.vsidx Binary files differnew file mode 100644 index 0000000..d44db71 --- /dev/null +++ b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/FileContentIndex/1130880f-1d04-409a-a90b-bdb3676cc40e.vsidx diff --git a/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/FileContentIndex/read.lock b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/FileContentIndex/read.lock diff --git a/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/.suo b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/.suo Binary files differnew file mode 100644 index 0000000..6780491 --- /dev/null +++ b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/.suo diff --git a/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/Browse.VC.db b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/Browse.VC.db Binary files differnew file mode 100644 index 0000000..a712d2f --- /dev/null +++ b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/Browse.VC.db diff --git a/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/Browse.VC.db-shm b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/Browse.VC.db-shm Binary files differnew file mode 100644 index 0000000..7f41eff --- /dev/null +++ b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/Browse.VC.db-shm diff --git a/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/Browse.VC.db-wal b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/Browse.VC.db-wal Binary files differnew file mode 100644 index 0000000..75b84cb --- /dev/null +++ b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/Browse.VC.db-wal diff --git a/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/ipch/AutoPCH/287fdd08c9bfc3cb/CST116-CH8-DEBUGGING.ipch b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/ipch/AutoPCH/287fdd08c9bfc3cb/CST116-CH8-DEBUGGING.ipch Binary files differnew file mode 100644 index 0000000..75abf5d --- /dev/null +++ b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/ipch/AutoPCH/287fdd08c9bfc3cb/CST116-CH8-DEBUGGING.ipch diff --git a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp index 53e4a61..0c6e8d3 100644 --- a/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp +++ b/CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp @@ -1,3 +1,10 @@ +// Answers:
+// 1.7) Because the while loop has a semicolon that ends it, so the cout isn't actually in the while loop.
+// 2.3) Because the while loop evaluates to false, because 0 is not less than 0.
+// 2.4) See 2.3.
+// 4.5) 10.
+// 4.6) Nothing assigned 10 to count. Count was set to 0, then incremented by 1, 10 times.
+
/********************************************************************
* File: CST116-Ch8-Debugging.cpp
*
@@ -62,12 +69,12 @@ int main() // Breakpoint 1
// Put a breakpoint on the following line
- while (i < 0);
- cout << i << endl;
+ while (i < 10)
+ cout << i++ << endl;
// Breakpoint 2
// Put a breakpoint on the following line
- for (count = 0; count < 10; count++);
+ for (count = 0; count < 10; count++)
cout << count << endl;
return 0;
diff --git a/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CL.command.1.tlog b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CL.command.1.tlog Binary files differnew file mode 100644 index 0000000..66a6b40 --- /dev/null +++ b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CL.command.1.tlog diff --git a/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CL.read.1.tlog b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CL.read.1.tlog Binary files differnew file mode 100644 index 0000000..8b7b23d --- /dev/null +++ b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CL.read.1.tlog diff --git a/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CL.write.1.tlog b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CL.write.1.tlog Binary files differnew file mode 100644 index 0000000..f7daf62 --- /dev/null +++ b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CL.write.1.tlog diff --git a/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CST116-Ch8-Debugging.lastbuildstate b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CST116-Ch8-Debugging.lastbuildstate new file mode 100644 index 0000000..8590063 --- /dev/null +++ b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CST116-Ch8-Debugging.lastbuildstate @@ -0,0 +1,2 @@ +PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.33.31629:TargetPlatformVersion=10.0.19041.0: +Debug|x64|C:\Users\hey-t\Source\Repos\cst116-chapter8-debugging-AllTheNamesAreTaken3141\CST116-Ch8-Debugging\| diff --git a/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/link.command.1.tlog b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/link.command.1.tlog Binary files differnew file mode 100644 index 0000000..934cce3 --- /dev/null +++ b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/link.command.1.tlog diff --git a/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/link.read.1.tlog b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/link.read.1.tlog Binary files differnew file mode 100644 index 0000000..392ffa2 --- /dev/null +++ b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/link.read.1.tlog diff --git a/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/link.write.1.tlog b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/link.write.1.tlog Binary files differnew file mode 100644 index 0000000..e637c06 --- /dev/null +++ b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/link.write.1.tlog diff --git a/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.exe b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.exe Binary files differnew file mode 100644 index 0000000..cda9392 --- /dev/null +++ b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.exe diff --git a/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.exe.recipe b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.exe.recipe new file mode 100644 index 0000000..1b075f6 --- /dev/null +++ b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.exe.recipe @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project> + <ProjectOutputs> + <ProjectOutput> + <FullPath>C:\Users\hey-t\Source\Repos\cst116-chapter8-debugging-AllTheNamesAreTaken3141\CST116-Ch8-Debugging\x64\Debug\CST116-Ch8-Debugging.exe</FullPath> + </ProjectOutput> + </ProjectOutputs> + <ContentFiles /> + <SatelliteDlls /> + <NonRecipeFileRefs /> +</Project>
\ No newline at end of file diff --git a/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.ilk b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.ilk Binary files differnew file mode 100644 index 0000000..bf473b3 --- /dev/null +++ b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.ilk diff --git a/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.log b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.log new file mode 100644 index 0000000..718e240 --- /dev/null +++ b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.log @@ -0,0 +1,2 @@ + CST116-Ch8-Debugging.cpp + CST116-Ch8-Debugging.vcxproj -> C:\Users\hey-t\Source\Repos\cst116-chapter8-debugging-AllTheNamesAreTaken3141\CST116-Ch8-Debugging\x64\Debug\CST116-Ch8-Debugging.exe diff --git a/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.obj b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.obj Binary files differnew file mode 100644 index 0000000..77c2869 --- /dev/null +++ b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.obj diff --git a/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.pdb b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.pdb Binary files differnew file mode 100644 index 0000000..1b5e297 --- /dev/null +++ b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.pdb diff --git a/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.vcxproj.FileListAbsolute.txt b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.vcxproj.FileListAbsolute.txt new file mode 100644 index 0000000..aa24fee --- /dev/null +++ b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.vcxproj.FileListAbsolute.txt @@ -0,0 +1 @@ +C:\Users\hey-t\Source\Repos\cst116-chapter8-debugging-AllTheNamesAreTaken3141\CST116-Ch8-Debugging\x64\Debug\CST116-Ch8-Debugging.exe diff --git a/CST116-Ch8-Debugging/x64/Debug/vc143.idb b/CST116-Ch8-Debugging/x64/Debug/vc143.idb Binary files differnew file mode 100644 index 0000000..4cd0c54 --- /dev/null +++ b/CST116-Ch8-Debugging/x64/Debug/vc143.idb diff --git a/CST116-Ch8-Debugging/x64/Debug/vc143.pdb b/CST116-Ch8-Debugging/x64/Debug/vc143.pdb Binary files differnew file mode 100644 index 0000000..5b9fbbd --- /dev/null +++ b/CST116-Ch8-Debugging/x64/Debug/vc143.pdb |