From 61c606c2931719c2414f5c23106dd46961af956d Mon Sep 17 00:00:00 2001 From: Joseph Williams Date: Thu, 6 Oct 2022 15:05:23 -0700 Subject: finished fixing buggy code --- .../1130880f-1d04-409a-a90b-bdb3676cc40e.vsidx | Bin 0 -> 14028 bytes .../CST116-Ch8-Debugging/FileContentIndex/read.lock | 0 .../.vs/CST116-Ch8-Debugging/v17/.suo | Bin 0 -> 33280 bytes .../.vs/CST116-Ch8-Debugging/v17/Browse.VC.db | Bin 0 -> 16375808 bytes .../.vs/CST116-Ch8-Debugging/v17/Browse.VC.db-shm | Bin 0 -> 32768 bytes .../.vs/CST116-Ch8-Debugging/v17/Browse.VC.db-wal | Bin 0 -> 1454264 bytes .../287fdd08c9bfc3cb/CST116-CH8-DEBUGGING.ipch | Bin 0 -> 37355520 bytes CST116-Ch8-Debugging/CST116-Ch8-Debugging.cpp | 13 ++++++++++--- .../Debug/CST116-C.15fb2850.tlog/CL.command.1.tlog | Bin 0 -> 1018 bytes .../x64/Debug/CST116-C.15fb2850.tlog/CL.read.1.tlog | Bin 0 -> 19816 bytes .../x64/Debug/CST116-C.15fb2850.tlog/CL.write.1.tlog | Bin 0 -> 1004 bytes .../CST116-Ch8-Debugging.lastbuildstate | 2 ++ .../Debug/CST116-C.15fb2850.tlog/link.command.1.tlog | Bin 0 -> 1904 bytes .../Debug/CST116-C.15fb2850.tlog/link.read.1.tlog | Bin 0 -> 3750 bytes .../Debug/CST116-C.15fb2850.tlog/link.write.1.tlog | Bin 0 -> 1084 bytes .../x64/Debug/CST116-Ch8-Debugging.exe | Bin 0 -> 61440 bytes .../x64/Debug/CST116-Ch8-Debugging.exe.recipe | 11 +++++++++++ .../x64/Debug/CST116-Ch8-Debugging.ilk | Bin 0 -> 608880 bytes .../x64/Debug/CST116-Ch8-Debugging.log | 2 ++ .../x64/Debug/CST116-Ch8-Debugging.obj | Bin 0 -> 52060 bytes .../x64/Debug/CST116-Ch8-Debugging.pdb | Bin 0 -> 1363968 bytes ...CST116-Ch8-Debugging.vcxproj.FileListAbsolute.txt | 1 + CST116-Ch8-Debugging/x64/Debug/vc143.idb | Bin 0 -> 166912 bytes CST116-Ch8-Debugging/x64/Debug/vc143.pdb | Bin 0 -> 397312 bytes 24 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/FileContentIndex/1130880f-1d04-409a-a90b-bdb3676cc40e.vsidx create mode 100644 CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/FileContentIndex/read.lock create mode 100644 CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/.suo create mode 100644 CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/Browse.VC.db create mode 100644 CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/Browse.VC.db-shm create mode 100644 CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/Browse.VC.db-wal create mode 100644 CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/ipch/AutoPCH/287fdd08c9bfc3cb/CST116-CH8-DEBUGGING.ipch create mode 100644 CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CL.command.1.tlog create mode 100644 CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CL.read.1.tlog create mode 100644 CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CL.write.1.tlog create mode 100644 CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CST116-Ch8-Debugging.lastbuildstate create mode 100644 CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/link.command.1.tlog create mode 100644 CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/link.read.1.tlog create mode 100644 CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/link.write.1.tlog create mode 100644 CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.exe create mode 100644 CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.exe.recipe create mode 100644 CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.ilk create mode 100644 CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.log create mode 100644 CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.obj create mode 100644 CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.pdb create mode 100644 CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.vcxproj.FileListAbsolute.txt create mode 100644 CST116-Ch8-Debugging/x64/Debug/vc143.idb create mode 100644 CST116-Ch8-Debugging/x64/Debug/vc143.pdb (limited to 'CST116-Ch8-Debugging') 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 new file mode 100644 index 0000000..d44db71 Binary files /dev/null and b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/FileContentIndex/1130880f-1d04-409a-a90b-bdb3676cc40e.vsidx differ 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 diff --git a/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/.suo b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/.suo new file mode 100644 index 0000000..6780491 Binary files /dev/null and b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/.suo differ 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 new file mode 100644 index 0000000..a712d2f Binary files /dev/null and b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/Browse.VC.db differ 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 new file mode 100644 index 0000000..7f41eff Binary files /dev/null and b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/Browse.VC.db-shm differ 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 new file mode 100644 index 0000000..75b84cb Binary files /dev/null and b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/Browse.VC.db-wal differ 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 new file mode 100644 index 0000000..75abf5d Binary files /dev/null and b/CST116-Ch8-Debugging/.vs/CST116-Ch8-Debugging/v17/ipch/AutoPCH/287fdd08c9bfc3cb/CST116-CH8-DEBUGGING.ipch differ 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 new file mode 100644 index 0000000..66a6b40 Binary files /dev/null and b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CL.command.1.tlog differ 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 new file mode 100644 index 0000000..8b7b23d Binary files /dev/null and b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CL.read.1.tlog differ 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 new file mode 100644 index 0000000..f7daf62 Binary files /dev/null and b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/CL.write.1.tlog differ 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 new file mode 100644 index 0000000..934cce3 Binary files /dev/null and b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/link.command.1.tlog differ 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 new file mode 100644 index 0000000..392ffa2 Binary files /dev/null and b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/link.read.1.tlog differ 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 new file mode 100644 index 0000000..e637c06 Binary files /dev/null and b/CST116-Ch8-Debugging/x64/Debug/CST116-C.15fb2850.tlog/link.write.1.tlog differ diff --git a/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.exe b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.exe new file mode 100644 index 0000000..cda9392 Binary files /dev/null and b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.exe differ 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 @@ + + + + + C:\Users\hey-t\Source\Repos\cst116-chapter8-debugging-AllTheNamesAreTaken3141\CST116-Ch8-Debugging\x64\Debug\CST116-Ch8-Debugging.exe + + + + + + \ 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 new file mode 100644 index 0000000..bf473b3 Binary files /dev/null and b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.ilk differ 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 new file mode 100644 index 0000000..77c2869 Binary files /dev/null and b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.obj differ diff --git a/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.pdb b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.pdb new file mode 100644 index 0000000..1b5e297 Binary files /dev/null and b/CST116-Ch8-Debugging/x64/Debug/CST116-Ch8-Debugging.pdb differ 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 new file mode 100644 index 0000000..4cd0c54 Binary files /dev/null and b/CST116-Ch8-Debugging/x64/Debug/vc143.idb differ diff --git a/CST116-Ch8-Debugging/x64/Debug/vc143.pdb b/CST116-Ch8-Debugging/x64/Debug/vc143.pdb new file mode 100644 index 0000000..5b9fbbd Binary files /dev/null and b/CST116-Ch8-Debugging/x64/Debug/vc143.pdb differ -- cgit v1.2.3