├── 979-8-8688-0773-2.jpg ├── CM ├── cm-lin.sh ├── cm-win.bat └── settings.cmake ├── CMakeLists.txt ├── Chapter01 ├── CMakeLists.txt ├── Ch01_01 │ ├── CMakeLists.txt │ ├── Ch01_01.cpp │ ├── Ch01_01.h │ ├── Ch01_01.vcxproj │ ├── Ch01_01.vcxproj.filters │ ├── Ch01_01.vcxproj.user │ └── Ch01_01_ex.cpp ├── Ch01_02 │ ├── CMakeLists.txt │ ├── Ch01_02.cpp │ ├── Ch01_02.h │ ├── Ch01_02.vcxproj │ ├── Ch01_02.vcxproj.filters │ ├── Ch01_02.vcxproj.user │ └── Ch01_02_ex.cpp ├── Ch01_03 │ ├── CMakeLists.txt │ ├── Ch01_03.cpp │ ├── Ch01_03.h │ ├── Ch01_03.vcxproj │ ├── Ch01_03.vcxproj.filters │ ├── Ch01_03.vcxproj.user │ └── Ch01_03_ex.cpp ├── Ch01_04 │ ├── CMakeLists.txt │ ├── Ch01_04.cpp │ ├── Ch01_04.h │ ├── Ch01_04.vcxproj │ ├── Ch01_04.vcxproj.filters │ ├── Ch01_04.vcxproj.user │ └── Ch01_04_ex.cpp ├── Ch01_05 │ ├── CMakeLists.txt │ ├── Ch01_05.cpp │ ├── Ch01_05.h │ ├── Ch01_05.vcxproj │ ├── Ch01_05.vcxproj.filters │ ├── Ch01_05.vcxproj.user │ └── Ch01_05_ex.cpp ├── Ch01_06 │ ├── CMakeLists.txt │ ├── Ch01_06.cpp │ ├── Ch01_06.h │ ├── Ch01_06.vcxproj │ ├── Ch01_06.vcxproj.filters │ ├── Ch01_06.vcxproj.user │ └── Ch01_06_ex.cpp ├── Ch01_07 │ ├── CMakeLists.txt │ ├── Ch01_07.cpp │ ├── Ch01_07.h │ ├── Ch01_07.vcxproj │ ├── Ch01_07.vcxproj.filters │ ├── Ch01_07.vcxproj.user │ └── Ch01_07_ex.cpp ├── Ch01_08 │ ├── CMakeLists.txt │ ├── Ch01_08.cpp │ ├── Ch01_08.h │ ├── Ch01_08.vcxproj │ ├── Ch01_08.vcxproj.filters │ ├── Ch01_08.vcxproj.user │ └── Ch01_08_ex.cpp ├── Chapter01.sln ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter02 ├── CMakeLists.txt ├── Ch02_01 │ ├── CMakeLists.txt │ ├── Ch02_01.cpp │ ├── Ch02_01.h │ ├── Ch02_01.vcxproj │ ├── Ch02_01.vcxproj.filters │ ├── Ch02_01.vcxproj.user │ └── Ch02_01_ex.cpp ├── Ch02_02 │ ├── CMakeLists.txt │ ├── Ch02_02.cpp │ ├── Ch02_02.h │ ├── Ch02_02.vcxproj │ ├── Ch02_02.vcxproj.filters │ ├── Ch02_02.vcxproj.user │ └── Ch02_02_ex.cpp ├── Ch02_03 │ ├── CMakeLists.txt │ ├── Ch02_03.cpp │ ├── Ch02_03.h │ ├── Ch02_03.vcxproj │ ├── Ch02_03.vcxproj.filters │ ├── Ch02_03.vcxproj.user │ ├── Ch02_03_ex.cpp │ └── Ch02_03_misc.cpp ├── Ch02_04 │ ├── CMakeLists.txt │ ├── Ch02_04.cpp │ ├── Ch02_04.h │ ├── Ch02_04.vcxproj │ ├── Ch02_04.vcxproj.filters │ ├── Ch02_04.vcxproj.user │ └── Ch02_04_ex.cpp ├── Ch02_05 │ ├── CMakeLists.txt │ ├── Ch02_05.cpp │ ├── Ch02_05.h │ ├── Ch02_05.vcxproj │ ├── Ch02_05.vcxproj.filters │ ├── Ch02_05.vcxproj.user │ └── Ch02_05_ex.cpp ├── Chapter02.sln ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter03 ├── CMakeLists.txt ├── Ch03_01 │ ├── CMakeLists.txt │ ├── Ch03_01.cpp │ ├── Ch03_01.h │ ├── Ch03_01.vcxproj │ ├── Ch03_01.vcxproj.filters │ ├── Ch03_01.vcxproj.user │ ├── Ch03_01_ex.cpp │ ├── Ch03_01_misc.cpp │ └── Ch03_02_ex.cpp ├── Ch03_02 │ ├── CMakeLists.txt │ ├── Ch03_02.cpp │ ├── Ch03_02.h │ ├── Ch03_02.vcxproj │ ├── Ch03_02.vcxproj.filters │ ├── Ch03_02.vcxproj.user │ └── Ch03_02_ex.cpp ├── Ch03_03 │ ├── CMakeLists.txt │ ├── Ch03_03.cpp │ ├── Ch03_03.h │ ├── Ch03_03.vcxproj │ ├── Ch03_03.vcxproj.filters │ ├── Ch03_03.vcxproj.user │ └── Ch03_03_ex.cpp ├── Chapter03.sln ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter04 ├── CMakeLists.txt ├── Ch04_01 │ ├── CMakeLists.txt │ ├── Ch04_01.cpp │ ├── Ch04_01.h │ ├── Ch04_01.vcxproj │ ├── Ch04_01.vcxproj.filters │ ├── Ch04_01.vcxproj.user │ └── Ch04_01_ex.cpp ├── Ch04_02 │ ├── CMakeLists.txt │ ├── Ch04_02.cpp │ ├── Ch04_02.h │ ├── Ch04_02.vcxproj │ ├── Ch04_02.vcxproj.filters │ ├── Ch04_02.vcxproj.user │ └── Ch04_02_ex.cpp ├── Ch04_03 │ ├── CMakeLists.txt │ ├── Ch04_03.cpp │ ├── Ch04_03.h │ ├── Ch04_03.vcxproj │ ├── Ch04_03.vcxproj.filters │ ├── Ch04_03.vcxproj.user │ └── Ch04_03_ex.cpp ├── Ch04_04 │ ├── CMakeLists.txt │ ├── Ch04_04.cpp │ ├── Ch04_04.h │ ├── Ch04_04.vcxproj │ ├── Ch04_04.vcxproj.filters │ ├── Ch04_04.vcxproj.user │ └── Ch04_04_ex.cpp ├── Chapter04.sln ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter05 ├── CMakeLists.txt ├── Ch05_01 │ ├── CMakeLists.txt │ ├── Ch05_01.cpp │ ├── Ch05_01.h │ ├── Ch05_01.vcxproj │ ├── Ch05_01.vcxproj.filters │ ├── Ch05_01.vcxproj.user │ └── Ch05_01_ex.cpp ├── Ch05_02 │ ├── CMakeLists.txt │ ├── Ch05_02.cpp │ ├── Ch05_02.h │ ├── Ch05_02.vcxproj │ ├── Ch05_02.vcxproj.filters │ ├── Ch05_02.vcxproj.user │ └── Ch05_02_ex.cpp ├── Ch05_03 │ ├── CMakeLists.txt │ ├── Ch05_03.cpp │ ├── Ch05_03.h │ ├── Ch05_03.vcxproj │ ├── Ch05_03.vcxproj.filters │ ├── Ch05_03.vcxproj.user │ └── Ch05_03_ex.cpp ├── Ch05_04 │ ├── CMakeLists.txt │ ├── Ch05_04.cpp │ ├── Ch05_04.h │ ├── Ch05_04.vcxproj │ ├── Ch05_04.vcxproj.filters │ ├── Ch05_04.vcxproj.user │ └── Ch05_04_ex.cpp ├── Ch05_05 │ ├── CMakeLists.txt │ ├── Ch05_05.cpp │ ├── Ch05_05.h │ ├── Ch05_05.vcxproj │ ├── Ch05_05.vcxproj.filters │ ├── Ch05_05.vcxproj.user │ └── Ch05_05_ex.cpp ├── Ch05_06 │ ├── CMakeLists.txt │ ├── Ch05_06 │ ├── Ch05_06.cpp │ ├── Ch05_06.h │ ├── Ch05_06.vcxproj │ ├── Ch05_06.vcxproj.filters │ ├── Ch05_06.vcxproj.user │ └── Ch05_06_ex.cpp ├── Chapter05.sln ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter06 ├── CMakeLists.txt ├── Ch06_01 │ ├── CMakeLists.txt │ ├── Ch06_01 │ ├── Ch06_01.cpp │ ├── Ch06_01.h │ ├── Ch06_01.vcxproj │ ├── Ch06_01.vcxproj.filters │ ├── Ch06_01.vcxproj.user │ ├── Ch06_01_ex.cpp │ └── Ch06_01_misc.cpp ├── Ch06_02 │ ├── CMakeLists.txt │ ├── Ch06_02.cpp │ ├── Ch06_02.h │ ├── Ch06_02.vcxproj │ ├── Ch06_02.vcxproj.filters │ ├── Ch06_02.vcxproj.user │ └── Ch06_02_ex.cpp ├── Ch06_03 │ ├── CMakeLists.txt │ ├── Ch06_03.cpp │ ├── Ch06_03.h │ ├── Ch06_03.vcxproj │ ├── Ch06_03.vcxproj.filters │ ├── Ch06_03.vcxproj.user │ └── Ch06_03_ex.cpp ├── Chapter06.sln ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter07 ├── CMakeLists.txt ├── Ch07_01 │ ├── CMakeLists.txt │ ├── Ch07_01.cpp │ ├── Ch07_01.h │ ├── Ch07_01.vcxproj │ ├── Ch07_01.vcxproj.filters │ ├── Ch07_01.vcxproj.user │ └── Ch07_01_ex.cpp ├── Ch07_02 │ ├── CMakeLists.txt │ ├── Ch07_02.cpp │ ├── Ch07_02.h │ ├── Ch07_02.vcxproj │ ├── Ch07_02.vcxproj.filters │ ├── Ch07_02.vcxproj.user │ └── Ch07_02_ex.cpp ├── Ch07_03 │ ├── CMakeLists.txt │ ├── Ch07_03.cpp │ ├── Ch07_03.h │ ├── Ch07_03.vcxproj │ ├── Ch07_03.vcxproj.filters │ ├── Ch07_03.vcxproj.user │ └── Ch07_03_ex.cpp ├── Ch07_04 │ ├── CMakeLists.txt │ ├── Ch07_04.cpp │ ├── Ch07_04.h │ ├── Ch07_04.vcxproj │ ├── Ch07_04.vcxproj.filters │ ├── Ch07_04.vcxproj.user │ └── Ch07_04_ex.cpp ├── Ch07_results.log ├── Chapter07.sln ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter08 ├── CMakeLists.txt ├── Ch08_01 │ ├── CMakeLists.txt │ ├── Ch08_01.cpp │ ├── Ch08_01.h │ ├── Ch08_01.vcxproj │ ├── Ch08_01.vcxproj.filters │ ├── Ch08_01.vcxproj.user │ ├── Ch08_01_ex.cpp │ └── Ch08_01_misc.cpp ├── Ch08_02 │ ├── CMakeLists.txt │ ├── Ch08_02.cpp │ ├── Ch08_02.h │ ├── Ch08_02.vcxproj │ ├── Ch08_02.vcxproj.filters │ ├── Ch08_02.vcxproj.user │ ├── Ch08_02_ex.cpp │ └── Ch08_02_misc.cpp ├── Ch08_03 │ ├── CMakeLists.txt │ ├── Ch08_03.cpp │ ├── Ch08_03.h │ ├── Ch08_03.vcxproj │ ├── Ch08_03.vcxproj.filters │ ├── Ch08_03.vcxproj.user │ ├── Ch08_03_ex.cpp │ └── Ch08_03_misc.cpp ├── Ch08_04 │ ├── CMakeLists.txt │ ├── Ch08_04.cpp │ ├── Ch08_04.h │ ├── Ch08_04.vcxproj │ ├── Ch08_04.vcxproj.filters │ ├── Ch08_04.vcxproj.user │ ├── Ch08_04_ex.cpp │ └── Ch08_04_misc.cpp ├── Chapter08.sln ├── ch08_results_lin.log ├── ch08_results_win (old _04 lat-lon).log ├── ch08_results_win.log ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter09 ├── CMakeLists.txt ├── Ch09_01 │ ├── CMakeLists.txt │ ├── Ch09_01.cpp │ ├── Ch09_01.h │ ├── Ch09_01.vcxproj │ ├── Ch09_01.vcxproj.filters │ ├── Ch09_01.vcxproj.user │ ├── Ch09_01_ex.cpp │ ├── TowerOfHanoi.cpp │ └── TowerOfHanoi.h ├── Ch09_02 │ ├── CMakeLists.txt │ ├── Ch09_02.cpp │ ├── Ch09_02.h │ ├── Ch09_02.vcxproj │ ├── Ch09_02.vcxproj.filters │ ├── Ch09_02.vcxproj.user │ └── Ch09_02_ex.cpp ├── Ch09_03 │ ├── CMakeLists.txt │ ├── Ch09_03.cpp │ ├── Ch09_03.h │ ├── Ch09_03.vcxproj │ ├── Ch09_03.vcxproj.filters │ ├── Ch09_03.vcxproj.user │ └── Ch09_03_ex.cpp ├── Ch09_04 │ ├── CMakeLists.txt │ ├── Ch09_04.cpp │ ├── Ch09_04.h │ ├── Ch09_04.vcxproj │ ├── Ch09_04.vcxproj.filters │ ├── Ch09_04.vcxproj.user │ └── Ch09_04_ex.cpp ├── Ch09_05 │ ├── CMakeLists.txt │ ├── Ch09_05.cpp │ ├── Ch09_05.h │ ├── Ch09_05.vcxproj │ ├── Ch09_05.vcxproj.filters │ ├── Ch09_05.vcxproj.user │ └── Ch09_05_ex.cpp ├── Chapter09.sln ├── ch09_lin.log ├── ch09_lin32.log ├── ch09_win.log ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter10 ├── CMakeLists.txt ├── Ch10_01 │ ├── CMakeLists.txt │ ├── Ch10_01.cpp │ ├── Ch10_01.h │ ├── Ch10_01.vcxproj │ ├── Ch10_01.vcxproj.filters │ ├── Ch10_01.vcxproj.user │ └── Ch10_01_ex.cpp ├── Ch10_02 │ ├── CMakeLists.txt │ ├── Ch10_02.cpp │ ├── Ch10_02.h │ ├── Ch10_02.vcxproj │ ├── Ch10_02.vcxproj.filters │ ├── Ch10_02.vcxproj.user │ └── Ch10_02_ex.cpp ├── Ch10_03 │ ├── CMakeLists.txt │ ├── Ch10_03.cpp │ ├── Ch10_03.h │ ├── Ch10_03.vcxproj │ ├── Ch10_03.vcxproj.filters │ ├── Ch10_03.vcxproj.user │ └── Ch10_03_ex.cpp ├── Ch10_04 │ ├── CMakeLists.txt │ ├── Ch10_04.cpp │ ├── Ch10_04.h │ ├── Ch10_04.vcxproj │ ├── Ch10_04.vcxproj.filters │ ├── Ch10_04.vcxproj.user │ └── Ch10_04_ex.cpp ├── Ch10_05 │ ├── CMakeLists.txt │ ├── Ch10_05.cpp │ ├── Ch10_05.h │ ├── Ch10_05.vcxproj │ ├── Ch10_05.vcxproj.filters │ ├── Ch10_05.vcxproj.user │ └── Ch10_05_ex.cpp ├── Ch10_06 │ ├── CMakeLists.txt │ ├── Ch10_06.cpp │ ├── Ch10_06.h │ ├── Ch10_06.vcxproj │ ├── Ch10_06.vcxproj.filters │ ├── Ch10_06.vcxproj.user │ └── Ch10_06_ex.cpp ├── Ch10_07 │ ├── CMakeLists.txt │ ├── Ch10_07.cpp │ ├── Ch10_07.h │ ├── Ch10_07.vcxproj │ ├── Ch10_07.vcxproj.filters │ ├── Ch10_07.vcxproj.user │ └── Ch10_07_ex.cpp ├── Ch10_08 │ ├── CMakeLists.txt │ ├── Ch10_08.cpp │ ├── Ch10_08.h │ ├── Ch10_08.vcxproj │ ├── Ch10_08.vcxproj.filters │ ├── Ch10_08.vcxproj.user │ └── Ch10_08_ex.cpp ├── Chapter10.sln ├── ch10_win.log ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter11 ├── CMakeLists.txt ├── Ch11_01 │ ├── CMakeLists.txt │ ├── Ch11_01.cpp │ ├── Ch11_01.h │ ├── Ch11_01.vcxproj │ ├── Ch11_01.vcxproj.filters │ ├── Ch11_01.vcxproj.user │ └── Ch11_01_ex.cpp ├── Ch11_02 │ ├── CMakeLists.txt │ ├── Ch11_02.cpp │ ├── Ch11_02.h │ ├── Ch11_02.vcxproj │ ├── Ch11_02.vcxproj.filters │ ├── Ch11_02.vcxproj.user │ └── Ch11_02_ex.cpp ├── Ch11_03 │ ├── CMakeLists.txt │ ├── Ch11_03.cpp │ ├── Ch11_03.h │ ├── Ch11_03.vcxproj │ ├── Ch11_03.vcxproj.filters │ ├── Ch11_03.vcxproj.user │ └── Ch11_03_ex.cpp ├── Ch11_04 │ ├── CMakeLists.txt │ ├── Ch11_04.cpp │ ├── Ch11_04.h │ ├── Ch11_04.vcxproj │ ├── Ch11_04.vcxproj.filters │ ├── Ch11_04.vcxproj.user │ └── Ch11_04_ex.cpp ├── Ch11_05 │ ├── CMakeLists.txt │ ├── Ch11_05.cpp │ ├── Ch11_05.h │ ├── Ch11_05.vcxproj │ ├── Ch11_05.vcxproj.filters │ ├── Ch11_05.vcxproj.user │ └── Ch11_05_ex.cpp ├── Ch11_06 │ ├── CMakeLists.txt │ ├── Ch11_06.cpp │ ├── Ch11_06.h │ ├── Ch11_06.vcxproj │ ├── Ch11_06.vcxproj.filters │ ├── Ch11_06.vcxproj.user │ └── Ch11_06_ex.cpp ├── Ch11_07 │ ├── CMakeLists.txt │ ├── Ch11_07.cpp │ ├── Ch11_07.h │ ├── Ch11_07.vcxproj │ ├── Ch11_07.vcxproj.filters │ ├── Ch11_07.vcxproj.user │ └── Ch11_07_ex.cpp ├── Ch11_08 │ ├── CMakeLists.txt │ ├── Ch11_08.cpp │ ├── Ch11_08.h │ ├── Ch11_08.vcxproj │ ├── Ch11_08.vcxproj.filters │ ├── Ch11_08.vcxproj.user │ ├── Ch11_08_ex.cpp │ └── Ch11_08_misc.cpp ├── Chapter11.sln ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter12 ├── CMakeLists.txt ├── Ch12_01 │ ├── CMakeLists.txt │ ├── Ch12_01.cpp │ ├── Ch12_01.h │ ├── Ch12_01.vcxproj │ ├── Ch12_01.vcxproj.filters │ ├── Ch12_01.vcxproj.user │ └── Ch12_01_ex.cpp ├── Ch12_02 │ ├── CMakeLists.txt │ ├── Ch12_02.cpp │ ├── Ch12_02.h │ ├── Ch12_02.vcxproj │ ├── Ch12_02.vcxproj.filters │ ├── Ch12_02.vcxproj.user │ └── Ch12_02_ex.cpp ├── Ch12_03 │ ├── CMakeLists.txt │ ├── Ch12_03.cpp │ ├── Ch12_03.h │ ├── Ch12_03.vcxproj │ ├── Ch12_03.vcxproj.filters │ ├── Ch12_03.vcxproj.user │ └── Ch12_03_ex.cpp ├── Ch12_04 │ ├── CMakeLists.txt │ ├── Ch12_04.cpp │ ├── Ch12_04.h │ ├── Ch12_04.vcxproj │ ├── Ch12_04.vcxproj.filters │ ├── Ch12_04.vcxproj.user │ └── Ch12_04_ex.cpp ├── Chapter12.sln ├── ch12-lin.log ├── ch12-win.log ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter13 ├── CMakeLists.txt ├── Ch13-win.log ├── Ch13_01 │ ├── CMakeLists.txt │ ├── Ch13_01.cpp │ ├── Ch13_01.h │ ├── Ch13_01.vcxproj │ ├── Ch13_01.vcxproj.filters │ ├── Ch13_01.vcxproj.user │ └── Ch13_01_ex.cpp ├── Ch13_02 │ ├── CMakeLists.txt │ ├── Ch13_02.cpp │ ├── Ch13_02.h │ ├── Ch13_02.vcxproj │ ├── Ch13_02.vcxproj.filters │ ├── Ch13_02.vcxproj.user │ └── Ch13_02_ex.cpp ├── Ch13_03 │ ├── CMakeLists.txt │ ├── Ch13_03.cpp │ ├── Ch13_03.h │ ├── Ch13_03.vcxproj │ ├── Ch13_03.vcxproj.filters │ ├── Ch13_03.vcxproj.user │ └── Ch13_03_ex.cpp ├── Ch13_04 │ ├── CMakeLists.txt │ ├── Ch13_04.cpp │ ├── Ch13_04.h │ ├── Ch13_04.vcxproj │ ├── Ch13_04.vcxproj.filters │ ├── Ch13_04.vcxproj.user │ └── Ch13_04_ex.cpp ├── Ch13_05 │ ├── CMakeLists.txt │ ├── Ch13_05.cpp │ ├── Ch13_05.h │ ├── Ch13_05.vcxproj │ ├── Ch13_05.vcxproj.filters │ ├── Ch13_05.vcxproj.user │ └── Ch13_05_ex.cpp ├── Chapter13.sln ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter14 ├── CMakeLists.txt ├── Ch14-lin.log ├── Ch14-win.log ├── Ch14_01 │ ├── CMakeLists.txt │ ├── Ch14_01.cpp │ ├── Ch14_01.h │ ├── Ch14_01.vcxproj │ ├── Ch14_01.vcxproj.filters │ ├── Ch14_01.vcxproj.user │ └── Ch14_01_ex.cpp ├── Ch14_02 │ ├── CMakeLists.txt │ ├── Ch14_02.cpp │ ├── Ch14_02.h │ ├── Ch14_02.vcxproj │ ├── Ch14_02.vcxproj.filters │ ├── Ch14_02.vcxproj.user │ └── Ch14_02_ex.cpp ├── Ch14_03 │ ├── CMakeLists.txt │ ├── Ch14_03.cpp │ ├── Ch14_03.h │ ├── Ch14_03.vcxproj │ ├── Ch14_03.vcxproj.filters │ ├── Ch14_03.vcxproj.user │ └── Ch14_03_ex.cpp ├── Ch14_04 │ ├── CMakeLists.txt │ ├── Ch14_04.cpp │ ├── Ch14_04.h │ ├── Ch14_04.vcxproj │ ├── Ch14_04.vcxproj.filters │ ├── Ch14_04.vcxproj.user │ └── Ch14_04_ex.cpp ├── Ch14_05 │ ├── CMakeLists.txt │ ├── Ch14_05.cpp │ ├── Ch14_05.h │ ├── Ch14_05.vcxproj │ ├── Ch14_05.vcxproj.filters │ ├── Ch14_05.vcxproj.user │ └── Ch14_05_ex.cpp ├── Chapter14.sln ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter15 ├── CMakeLists.txt ├── Ch15-lin.log ├── Ch15_01 │ ├── CMakeLists.txt │ ├── Ch15_01.cpp │ ├── Ch15_01.h │ ├── Ch15_01.vcxproj │ ├── Ch15_01.vcxproj.filters │ ├── Ch15_01.vcxproj.user │ └── Ch15_01_ex.cpp ├── Ch15_02 │ ├── CMakeLists.txt │ ├── Ch15_02.cpp │ ├── Ch15_02.h │ ├── Ch15_02.vcxproj │ ├── Ch15_02.vcxproj.filters │ ├── Ch15_02.vcxproj.user │ └── Ch15_02_ex.cpp ├── Ch15_03 │ ├── CMakeLists.txt │ ├── Ch15_03.cpp │ ├── Ch15_03.h │ ├── Ch15_03.vcxproj │ ├── Ch15_03.vcxproj.filters │ ├── Ch15_03.vcxproj.user │ └── Ch15_03_ex.cpp ├── Ch15_04 │ ├── CMakeLists.txt │ ├── Ch15_04.cpp │ ├── Ch15_04.h │ ├── Ch15_04.vcxproj │ ├── Ch15_04.vcxproj.filters │ ├── Ch15_04.vcxproj.user │ └── Ch15_04_ex.cpp ├── Ch15_05 │ ├── CMakeLists.txt │ ├── Ch15_05.cpp │ ├── Ch15_05.h │ ├── Ch15_05.vcxproj │ ├── Ch15_05.vcxproj.filters │ ├── Ch15_05.vcxproj.user │ └── Ch15_05_ex.cpp ├── Chapter15.sln ├── ch15-win.log ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter16 ├── CMakeLists.txt ├── Ch16_01 │ ├── CMakeLists.txt │ ├── Ch16_01.cpp │ ├── Ch16_01.h │ ├── Ch16_01.vcxproj │ ├── Ch16_01.vcxproj.filters │ ├── Ch16_01.vcxproj.user │ └── Ch16_01_ex.cpp ├── Ch16_02 │ ├── CMakeLists.txt │ ├── Ch16_02.cpp │ ├── Ch16_02.h │ ├── Ch16_02.vcxproj │ ├── Ch16_02.vcxproj.filters │ ├── Ch16_02.vcxproj.user │ └── Ch16_02_ex.cpp ├── Ch16_03 │ ├── CMakeLists.txt │ ├── Ch16_03.cpp │ ├── Ch16_03.h │ ├── Ch16_03.vcxproj │ ├── Ch16_03.vcxproj.filters │ ├── Ch16_03.vcxproj.user │ └── Ch16_03_ex.cpp ├── Ch16_04 │ ├── CMakeLists.txt │ ├── Ch16_04.cpp │ ├── Ch16_04.h │ ├── Ch16_04.vcxproj │ ├── Ch16_04.vcxproj.filters │ ├── Ch16_04.vcxproj.user │ └── Ch16_04_ex.cpp ├── Ch16_05 │ ├── CMakeLists.txt │ ├── Ch16_05.cpp │ ├── Ch16_05.h │ ├── Ch16_05.vcxproj │ ├── Ch16_05.vcxproj.filters │ ├── Ch16_05.vcxproj.user │ └── Ch16_05_ex.cpp ├── Ch16_05_ex1_results-lin.xlsx ├── Ch16_05_ex1_results-win.xlsx ├── Chapter16.sln ├── ch16-results-lin.log ├── ch16-results-win.log ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter17 ├── CMakeLists.txt ├── Ch17-lin.log ├── Ch17-win.log ├── Ch17_01 │ ├── CMakeLists.txt │ ├── Ch17_01.cpp │ ├── Ch17_01.h │ ├── Ch17_01.vcxproj │ ├── Ch17_01.vcxproj.filters │ ├── Ch17_01.vcxproj.user │ └── Ch17_01_ex.cpp ├── Ch17_02 │ ├── CMakeLists.txt │ ├── Ch17_02.cpp │ ├── Ch17_02.h │ ├── Ch17_02.vcxproj │ ├── Ch17_02.vcxproj.filters │ ├── Ch17_02.vcxproj.user │ └── Ch17_02_ex.cpp ├── Ch17_03 │ ├── CMakeLists.txt │ ├── Ch17_03.cpp │ ├── Ch17_03.h │ ├── Ch17_03.vcxproj │ ├── Ch17_03.vcxproj.filters │ ├── Ch17_03.vcxproj.user │ └── Ch17_03_ex.cpp ├── Ch17_04 │ ├── CMakeLists.txt │ ├── Ch17_04.cpp │ ├── Ch17_04.h │ ├── Ch17_04.vcxproj │ ├── Ch17_04.vcxproj.filters │ ├── Ch17_04.vcxproj.user │ └── Ch17_04_ex.cpp ├── Chapter17.sln ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter18 ├── CMakeLists.txt ├── Ch18_01 │ ├── CMakeLists.txt │ ├── Ch18_01.cpp │ ├── Ch18_01.h │ ├── Ch18_01.vcxproj │ ├── Ch18_01.vcxproj.filters │ ├── Ch18_01.vcxproj.user │ └── Ch18_01_ex.cpp ├── Ch18_02 │ ├── CMakeLists.txt │ ├── Ch18_02.cpp │ ├── Ch18_02.h │ ├── Ch18_02.vcxproj │ ├── Ch18_02.vcxproj.filters │ ├── Ch18_02.vcxproj.user │ └── Ch18_02_ex.cpp ├── Ch18_03 │ ├── CMakeLists.txt │ ├── Ch18_03.cpp │ ├── Ch18_03.h │ ├── Ch18_03.vcxproj │ ├── Ch18_03.vcxproj.filters │ ├── Ch18_03.vcxproj.user │ ├── Ch18_03_ex.cpp │ └── Ch18_03_misc.cpp ├── Ch18_04 │ ├── CMakeLists.txt │ ├── Ch18_04.cpp │ ├── Ch18_04.h │ ├── Ch18_04.vcxproj │ ├── Ch18_04.vcxproj.filters │ ├── Ch18_04.vcxproj.user │ └── Ch18_04_ex.cpp ├── Ch18_05 │ ├── CMakeLists.txt │ ├── Ch18_05.cpp │ ├── Ch18_05.h │ ├── Ch18_05.vcxproj │ ├── Ch18_05.vcxproj.filters │ ├── Ch18_05.vcxproj.user │ └── Ch18_05_ex.cpp ├── Chapter18.sln ├── ch18-lin.log ├── ch18-win.log ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter19 ├── CMakeLists.txt ├── Ch19_01 │ ├── CMakeLists.txt │ ├── Ch19_01.cpp │ ├── Ch19_01.h │ ├── Ch19_01.vcxproj │ ├── Ch19_01.vcxproj.filters │ ├── Ch19_01.vcxproj.user │ └── Ch19_01_ex.cpp ├── Ch19_02 │ ├── CMakeLists.txt │ ├── Ch19_02.cpp │ ├── Ch19_02.h │ ├── Ch19_02.vcxproj │ ├── Ch19_02.vcxproj.filters │ ├── Ch19_02.vcxproj.user │ └── Ch19_02_ex.cpp ├── Ch19_03 │ ├── CMakeLists.txt │ ├── Ch19_03.cpp │ ├── Ch19_03.h │ ├── Ch19_03.vcxproj │ ├── Ch19_03.vcxproj.filters │ ├── Ch19_03.vcxproj.user │ └── Ch19_03_ex.cpp ├── Ch19_04 │ ├── CMakeLists.txt │ ├── Ch19_04.cpp │ ├── Ch19_04.h │ ├── Ch19_04.vcxproj │ ├── Ch19_04.vcxproj.filters │ ├── Ch19_04.vcxproj.user │ └── Ch19_04_ex.cpp ├── Ch19_05 │ ├── CMakeLists.txt │ ├── Ch19_05.cpp │ ├── Ch19_05.h │ ├── Ch19_05.vcxproj │ ├── Ch19_05.vcxproj.filters │ ├── Ch19_05.vcxproj.user │ └── Ch19_05_ex.cpp ├── Chapter19.sln ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter20 ├── CMakeLists.txt ├── Ch20_01 │ ├── CMakeLists.txt │ ├── Ch20_01.cpp │ ├── Ch20_01.h │ ├── Ch20_01.vcxproj │ ├── Ch20_01.vcxproj.filters │ ├── Ch20_01.vcxproj.user │ └── Ch20_01_ex.cpp ├── Ch20_02 │ ├── CMakeLists.txt │ ├── Ch20_02.cpp │ ├── Ch20_02.h │ ├── Ch20_02.vcxproj │ ├── Ch20_02.vcxproj.filters │ ├── Ch20_02.vcxproj.user │ └── Ch20_02_ex.cpp ├── Ch20_03 │ ├── CMakeLists.txt │ ├── Ch20_03.cpp │ ├── Ch20_03.h │ ├── Ch20_03.vcxproj │ ├── Ch20_03.vcxproj.filters │ ├── Ch20_03.vcxproj.user │ └── Ch20_03_ex.cpp ├── Ch20_04 │ ├── CMakeLists.txt │ ├── Ch20_04.cpp │ ├── Ch20_04.h │ ├── Ch20_04.vcxproj │ ├── Ch20_04.vcxproj.filters │ ├── Ch20_04.vcxproj.user │ └── Ch20_04_ex.cpp ├── Ch20_05 │ ├── CMakeLists.txt │ ├── Ch20_05.cpp │ ├── Ch20_05.h │ ├── Ch20_05.vcxproj │ ├── Ch20_05.vcxproj.filters │ ├── Ch20_05.vcxproj.user │ └── Ch20_05_ex.cpp ├── Chapter20.sln ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Chapter21 ├── CMakeLists.txt ├── Ch21_01 │ ├── CMakeLists.txt │ ├── Ch21_01.cpp │ ├── Ch21_01.h │ ├── Ch21_01.vcxproj │ ├── Ch21_01.vcxproj.filters │ ├── Ch21_01.vcxproj.user │ └── Ch21_01_ex.cpp ├── Ch21_02 │ ├── CMakeLists.txt │ ├── Ch21_02.cpp │ ├── Ch21_02.h │ ├── Ch21_02.vcxproj │ ├── Ch21_02.vcxproj.filters │ ├── Ch21_02.vcxproj.user │ └── Ch21_02_ex.cpp ├── Ch21_03 │ ├── CMakeLists.txt │ ├── Ch21_03.cpp │ ├── Ch21_03.h │ ├── Ch21_03.vcxproj │ ├── Ch21_03.vcxproj.filters │ ├── Ch21_03.vcxproj.user │ ├── Ch21_03_ex.cpp │ └── Ch21_03_misc.cpp ├── Ch21_04 │ ├── CMakeLists.txt │ ├── Ch21_04.cpp │ ├── Ch21_04.h │ ├── Ch21_04.vcxproj │ ├── Ch21_04.vcxproj.filters │ ├── Ch21_04.vcxproj.user │ └── Ch21_04_ex.cpp ├── Ch21_05 │ ├── CMakeLists.txt │ ├── Ch21_05.cpp │ ├── Ch21_05.h │ ├── Ch21_05.vcxproj │ ├── Ch21_05.vcxproj.filters │ ├── Ch21_05.vcxproj.user │ └── Ch21_05_ex.cpp ├── Chapter21.sln ├── mk.bat ├── mk.sh ├── r.bat └── r.sh ├── Common ├── Airport.cpp ├── Airport.h ├── AminoAcid.cpp ├── AminoAcid.h ├── BmTimer.h ├── Book.cpp ├── Book.h ├── Common.h ├── ConvData.h ├── CovData.h ├── DiceSet.cpp ├── DiceSet.h ├── HtmlColor.cpp ├── HtmlColor.h ├── Image.cpp ├── Image.h ├── ImageT.h ├── Line.h ├── MF.cpp ├── MF.h ├── MT.h ├── MTH.h ├── Matrix.h ├── Mineral.cpp ├── Mineral.h ├── Nut.cpp ├── Nut.h ├── Point2D.h ├── RGB.cpp ├── RGB.h ├── RN.h ├── Rect.cpp ├── Rect.h ├── RegPolygon.cpp ├── RegPolygon.h └── THR.h ├── Contributing.md ├── Doc ├── ImportantNotes.txt └── ReleaseHistory.txt ├── LICENSE.txt └── README.md /979-8-8688-0773-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/Practical-CPP-STL-Programming/2b44ac522ab58de600712dca46859fe8e30d36ea/979-8-8688-0773-2.jpg -------------------------------------------------------------------------------- /Chapter01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter01) 4 | add_subdirectory("./Ch01_01") 5 | add_subdirectory("./Ch01_02") 6 | add_subdirectory("./Ch01_03") 7 | add_subdirectory("./Ch01_04") 8 | add_subdirectory("./Ch01_05") 9 | add_subdirectory("./Ch01_06") 10 | add_subdirectory("./Ch01_07") 11 | add_subdirectory("./Ch01_08") 12 | -------------------------------------------------------------------------------- /Chapter01/Ch01_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch01_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | 13 | -------------------------------------------------------------------------------- /Chapter01/Ch01_01/Ch01_01.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch01_01.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch01_01.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch01_01 -----"); 15 | Ch01_01_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter01/Ch01_01/Ch01_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch01_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH01_01_H_ 6 | #define CH01_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch01_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter01/Ch01_01/Ch01_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter01/Ch01_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch01_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter01/Ch01_02/Ch01_02.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch01_02.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch01_02.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch01_02 -----"); 15 | Ch01_02_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter01/Ch01_02/Ch01_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch01_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH01_02_H_ 6 | #define CH01_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch01_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter01/Ch01_02/Ch01_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter01/Ch01_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch01_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter01/Ch01_03/Ch01_03.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch01_03.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch01_03.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch01_03 -----"); 15 | Ch01_03_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter01/Ch01_03/Ch01_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch01_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH01_03_H_ 6 | #define CH01_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch01_03_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter01/Ch01_03/Ch01_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter01/Ch01_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch01_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Image.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter01/Ch01_04/Ch01_04.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch01_04.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch01_04.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch01_04 -----"); 15 | Ch01_04_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter01/Ch01_04/Ch01_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch01_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH01_04_H_ 6 | #define CH01_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch01_04_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter01/Ch01_04/Ch01_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter01/Ch01_05/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch01_05) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter01/Ch01_05/Ch01_05.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch01_05.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch01_05.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch01_05 -----"); 15 | Ch01_05_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter01/Ch01_05/Ch01_05.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch01_05.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH01_05_H_ 6 | #define CH01_05_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch01_05_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter01/Ch01_05/Ch01_05.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter01/Ch01_06/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch01_06) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter01/Ch01_06/Ch01_06.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch01_06.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch01_06.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch01_06 -----"); 15 | Ch01_06_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter01/Ch01_06/Ch01_06.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch01_06.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH01_06_H_ 6 | #define CH01_06_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch01_06_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter01/Ch01_06/Ch01_06.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter01/Ch01_07/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch01_07) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter01/Ch01_07/Ch01_07.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch01_07.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch01_07.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch01_07 -----"); 15 | Ch01_07_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter01/Ch01_07/Ch01_07.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch01_07.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH01_07_H_ 6 | #define CH01_07_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch01_07_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter01/Ch01_07/Ch01_07.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter01/Ch01_08/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch01_08) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter01/Ch01_08/Ch01_08.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch01_08.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch01_08.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch01_08 -----"); 15 | Ch01_08_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter01/Ch01_08/Ch01_08.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch01_08.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH01_08_H_ 6 | #define CH01_08_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch01_08_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter01/Ch01_08/Ch01_08.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter01/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter01/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter01/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch01_01\%CONFIG%\Ch01_01 6 | %BDIR%\Ch01_02\%CONFIG%\Ch01_02 7 | %BDIR%\Ch01_03\%CONFIG%\Ch01_03 8 | %BDIR%\Ch01_04\%CONFIG%\Ch01_04 9 | %BDIR%\Ch01_05\%CONFIG%\Ch01_05 10 | %BDIR%\Ch01_06\%CONFIG%\Ch01_06 11 | %BDIR%\Ch01_07\%CONFIG%\Ch01_07 12 | 13 | rem Ch01_08 requires keyboard input, run directly from command line 14 | rem %BDIR%\Ch01_08\%CONFIG%\Ch01_08 15 | -------------------------------------------------------------------------------- /Chapter01/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch01_01/Ch01_01 10 | $BDIR/Ch01_02/Ch01_02 11 | $BDIR/Ch01_03/Ch01_03 12 | $BDIR/Ch01_04/Ch01_04 13 | $BDIR/Ch01_05/Ch01_05 14 | $BDIR/Ch01_06/Ch01_06 15 | $BDIR/Ch01_07/Ch01_07 16 | 17 | # Ch01_08 requires keyboard input - run directly from command line 18 | # ./$BDIR/Ch01_08/Ch01_08 19 | -------------------------------------------------------------------------------- /Chapter02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter02) 4 | add_subdirectory("./Ch02_01") 5 | add_subdirectory("./Ch02_02") 6 | add_subdirectory("./Ch02_03") 7 | add_subdirectory("./Ch02_04") 8 | add_subdirectory("./Ch02_05") 9 | -------------------------------------------------------------------------------- /Chapter02/Ch02_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch02_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter02/Ch02_01/Ch02_01.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch02_01.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch02_01.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch02_01 -----"); 15 | Ch02_01_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter02/Ch02_01/Ch02_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch02_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH02_01_H_ 6 | #define CH02_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch02_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter02/Ch02_01/Ch02_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter02/Ch02_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch02_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/MF.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter02/Ch02_02/Ch02_02.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch02_02.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch02_02.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch02_02 -----"); 15 | Ch02_02_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter02/Ch02_02/Ch02_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch02_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH02_02_H_ 6 | #define CH02_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch02_02_ex(); 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Chapter02/Ch02_02/Ch02_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter02/Ch02_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch02_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp ${PROJNAME}_misc.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/MF.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter02/Ch02_03/Ch02_03.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch02_03.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch02_03.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch02_03 -----"); 15 | Ch02_03_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter02/Ch02_03/Ch02_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch02_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH02_03_H_ 6 | #define CH02_03_H_ 7 | #include "Common.h" 8 | 9 | extern void format_ex1(); // Ch02_03_misc.cpp 10 | extern void Ch02_03_ex(); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /Chapter02/Ch02_03/Ch02_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter02/Ch02_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch02_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/MF.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter02/Ch02_04/Ch02_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch02_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH02_04_H_ 6 | #define CH02_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch02_04_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter02/Ch02_04/Ch02_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter02/Ch02_05/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch02_05) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/MF.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter02/Ch02_05/Ch02_05.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch02_05.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch02_05.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch02_05 -----"); 15 | Ch02_05_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter02/Ch02_05/Ch02_05.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch02_05.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH02_05_H_ 6 | #define CH02_05_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch02_05_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter02/Ch02_05/Ch02_05.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter02/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter02/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter02/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch02_01\%CONFIG%\Ch02_01 6 | %BDIR%\Ch02_02\%CONFIG%\Ch02_02 7 | %BDIR%\Ch02_03\%CONFIG%\Ch02_03 8 | %BDIR%\Ch02_04\%CONFIG%\Ch02_04 9 | %BDIR%\Ch02_05\%CONFIG%\Ch02_05 10 | -------------------------------------------------------------------------------- /Chapter02/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch02_01/Ch02_01 10 | $BDIR/Ch02_02/Ch02_02 11 | $BDIR/Ch02_03/Ch02_03 12 | $BDIR/Ch02_04/Ch02_04 13 | $BDIR/Ch02_05/Ch02_05 14 | -------------------------------------------------------------------------------- /Chapter03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter03) 4 | add_subdirectory("./Ch03_01") 5 | add_subdirectory("./Ch03_02") 6 | add_subdirectory("./Ch03_03") 7 | -------------------------------------------------------------------------------- /Chapter03/Ch03_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch03_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp ${PROJNAME}_misc.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter03/Ch03_01/Ch03_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch03_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH03_01_H_ 6 | #define CH03_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch03_01_ex(); 10 | extern void test_operators(); // Ch03_01_misc.cpp 11 | 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /Chapter03/Ch03_01/Ch03_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter03/Ch03_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch03_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter03/Ch03_02/Ch03_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch03_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH03_02_H_ 6 | #define CH03_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch03_02_ex(); 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Chapter03/Ch03_02/Ch03_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter03/Ch03_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch03_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter03/Ch03_03/Ch03_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch03_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH03_03_H_ 6 | #define CH03_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch03_03_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter03/Ch03_03/Ch03_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter03/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter03/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter03/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch03_01\%CONFIG%\Ch03_01 6 | %BDIR%\Ch03_02\%CONFIG%\Ch03_02 7 | %BDIR%\Ch03_03\%CONFIG%\Ch03_03 8 | -------------------------------------------------------------------------------- /Chapter03/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch03_01/Ch03_01 10 | $BDIR/Ch03_02/Ch03_02 11 | $BDIR/Ch03_03/Ch03_03 12 | -------------------------------------------------------------------------------- /Chapter04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter04) 4 | add_subdirectory("./Ch04_01") 5 | add_subdirectory("./Ch04_02") 6 | add_subdirectory("./Ch04_03") 7 | add_subdirectory("./Ch04_04") 8 | -------------------------------------------------------------------------------- /Chapter04/Ch04_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch04_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter04/Ch04_01/Ch04_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch04_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH04_01_H_ 6 | #define CH04_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch04_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter04/Ch04_01/Ch04_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter04/Ch04_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch04_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter04/Ch04_02/Ch04_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch04_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH04_02_H_ 6 | #define CH04_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch04_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter04/Ch04_02/Ch04_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter04/Ch04_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch04_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter04/Ch04_03/Ch04_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch04_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH04_03_H_ 6 | #define CH04_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch04_03_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter04/Ch04_03/Ch04_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter04/Ch04_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch04_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter04/Ch04_04/Ch04_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch04_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH04_04_H_ 6 | #define CH04_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch04_04_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter04/Ch04_04/Ch04_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter04/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter04/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter04/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch04_01\%CONFIG%\Ch04_01 6 | %BDIR%\Ch04_02\%CONFIG%\Ch04_02 7 | %BDIR%\Ch04_03\%CONFIG%\Ch04_03 8 | %BDIR%\Ch04_04\%CONFIG%\Ch04_04 9 | -------------------------------------------------------------------------------- /Chapter04/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch04_01/Ch04_01 10 | $BDIR/Ch04_02/Ch04_02 11 | $BDIR/Ch04_03/Ch04_03 12 | $BDIR/Ch04_04/Ch04_04 13 | -------------------------------------------------------------------------------- /Chapter05/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter05) 4 | add_subdirectory("./Ch05_01") 5 | add_subdirectory("./Ch05_02") 6 | add_subdirectory("./Ch05_03") 7 | add_subdirectory("./Ch05_04") 8 | add_subdirectory("./Ch05_05") 9 | add_subdirectory("./Ch05_06") 10 | -------------------------------------------------------------------------------- /Chapter05/Ch05_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch05_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter05/Ch05_01/Ch05_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch05_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH05_01_H_ 6 | #define CH05_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch05_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter05/Ch05_01/Ch05_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter05/Ch05_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch05_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter05/Ch05_02/Ch05_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch05_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH05_02_H_ 6 | #define CH05_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch05_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter05/Ch05_02/Ch05_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter05/Ch05_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch05_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Rect.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter05/Ch05_03/Ch05_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch05_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH05_03_H_ 6 | #define CH05_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch05_03_ex(); 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Chapter05/Ch05_03/Ch05_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter05/Ch05_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch05_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Nut.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter05/Ch05_04/Ch05_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch05_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH05_04_H_ 6 | #define CH05_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch05_04_ex(); 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Chapter05/Ch05_04/Ch05_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter05/Ch05_05/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch05_05) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Rect.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter05/Ch05_05/Ch05_05.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch05_05.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH05_05_H_ 6 | #define CH05_05_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch05_05_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter05/Ch05_05/Ch05_05.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter05/Ch05_06/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch05_06) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/MF.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter05/Ch05_06/Ch05_06: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/Practical-CPP-STL-Programming/2b44ac522ab58de600712dca46859fe8e30d36ea/Chapter05/Ch05_06/Ch05_06 -------------------------------------------------------------------------------- /Chapter05/Ch05_06/Ch05_06.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch05_06.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch05_06.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch05_06 -----"); 15 | Ch05_06_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter05/Ch05_06/Ch05_06.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch05_06.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH05_06_H_ 6 | #define CH05_06_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch05_06_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter05/Ch05_06/Ch05_06.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter05/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter05/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter05/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch05_01\%CONFIG%\Ch05_01 6 | %BDIR%\Ch05_02\%CONFIG%\Ch05_02 7 | %BDIR%\Ch05_03\%CONFIG%\Ch05_03 8 | %BDIR%\Ch05_04\%CONFIG%\Ch05_04 9 | %BDIR%\Ch05_05\%CONFIG%\Ch05_05 10 | %BDIR%\Ch05_06\%CONFIG%\Ch05_06 11 | -------------------------------------------------------------------------------- /Chapter05/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch05_01/Ch05_01 10 | $BDIR/Ch05_02/Ch05_02 11 | $BDIR/Ch05_03/Ch05_03 12 | $BDIR/Ch05_04/Ch05_04 13 | $BDIR/Ch05_05/Ch05_05 14 | $BDIR/Ch05_06/Ch05_06 15 | -------------------------------------------------------------------------------- /Chapter06/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter06) 4 | add_subdirectory("./Ch06_01") 5 | add_subdirectory("./Ch06_02") 6 | add_subdirectory("./Ch06_03") 7 | -------------------------------------------------------------------------------- /Chapter06/Ch06_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch06_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp ${PROJNAME}_misc.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Book.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter06/Ch06_01/Ch06_01: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/Practical-CPP-STL-Programming/2b44ac522ab58de600712dca46859fe8e30d36ea/Chapter06/Ch06_01/Ch06_01 -------------------------------------------------------------------------------- /Chapter06/Ch06_01/Ch06_01.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch06_01.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch06_01.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch06_01 -----"); 15 | Ch06_01_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter06/Ch06_01/Ch06_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch06_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH06_01_H_ 6 | #define CH06_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch06_01_ex(); 10 | extern void test_ptr(); // see Ch06_01_misc.cpp 11 | 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /Chapter06/Ch06_01/Ch06_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter06/Ch06_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch06_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Book.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter06/Ch06_02/Ch06_02.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch06_02.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch06_02.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch06_02 -----"); 15 | Ch06_02_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter06/Ch06_02/Ch06_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch06_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH06_02_H_ 6 | #define CH06_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch06_02_ex(); 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Chapter06/Ch06_02/Ch06_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter06/Ch06_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch06_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Book.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter06/Ch06_03/Ch06_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch06_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH06_03_H_ 6 | #define CH06_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch06_03_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter06/Ch06_03/Ch06_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter06/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter06/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter06/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch06_01\%CONFIG%\Ch06_01 6 | %BDIR%\Ch06_02\%CONFIG%\Ch06_02 7 | %BDIR%\Ch06_03\%CONFIG%\Ch06_03 8 | -------------------------------------------------------------------------------- /Chapter06/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch06_01/Ch06_01 10 | $BDIR/Ch06_02/Ch06_02 11 | $BDIR/Ch06_03/Ch06_03 12 | -------------------------------------------------------------------------------- /Chapter07/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter07) 4 | add_subdirectory("./Ch07_01") 5 | add_subdirectory("./Ch07_02") 6 | add_subdirectory("./Ch07_03") 7 | add_subdirectory("./Ch07_04") 8 | -------------------------------------------------------------------------------- /Chapter07/Ch07_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch07_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter07/Ch07_01/Ch07_01.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch07_01.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch07_01.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch07_01 -----"); 15 | Ch07_01_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter07/Ch07_01/Ch07_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch07_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH07_01_H_ 6 | #define CH07_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch07_01_ex(); 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Chapter07/Ch07_01/Ch07_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter07/Ch07_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch07_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter07/Ch07_02/Ch07_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch07_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH07_02_H_ 6 | #define CH07_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch07_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter07/Ch07_02/Ch07_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter07/Ch07_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch07_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/RGB.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter07/Ch07_03/Ch07_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch07_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH07_03_H_ 6 | #define CH07_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch07_03_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter07/Ch07_03/Ch07_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter07/Ch07_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch07_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter07/Ch07_04/Ch07_04.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch07_04.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch07_04.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch07_04 -----"); 15 | Ch07_04_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter07/Ch07_04/Ch07_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch07_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH07_04_H_ 6 | #define CH07_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch07_04_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter07/Ch07_04/Ch07_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter07/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter07/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter07/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch07_01\%CONFIG%\Ch07_01 6 | %BDIR%\Ch07_02\%CONFIG%\Ch07_02 7 | %BDIR%\Ch07_03\%CONFIG%\Ch07_03 8 | %BDIR%\Ch07_04\%CONFIG%\Ch07_04 9 | -------------------------------------------------------------------------------- /Chapter07/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch07_01/Ch07_01 10 | $BDIR/Ch07_02/Ch07_02 11 | $BDIR/Ch07_03/Ch07_03 12 | $BDIR/Ch07_04/Ch07_04 13 | -------------------------------------------------------------------------------- /Chapter08/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter08) 4 | add_subdirectory("./Ch08_01") 5 | add_subdirectory("./Ch08_02") 6 | add_subdirectory("./Ch08_03") 7 | add_subdirectory("./Ch08_04") 8 | -------------------------------------------------------------------------------- /Chapter08/Ch08_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch08_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp ${PROJNAME}_misc.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/HtmlColor.cpp ${COMMON_DIR}/MF.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter08/Ch08_01/Ch08_01.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch08_01.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch08_01.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch08_01 -----"); 15 | Ch08_01_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter08/Ch08_01/Ch08_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter08/Ch08_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch08_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp ${PROJNAME}_misc.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/HtmlColor.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter08/Ch08_02/Ch08_02.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch08_02.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch08_02.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch08_02 -----"); 15 | Ch08_02_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter08/Ch08_02/Ch08_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch08_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH08_02_H_ 6 | #define CH08_02_H_ 7 | #include 8 | #include "Common.h" 9 | #include "HtmlColor.h" 10 | 11 | // type alias for example Ch08_02 12 | using uno_mset_t = std::unordered_multiset; 14 | 15 | // Ch08_02_ex.cpp 16 | extern void Ch08_02_ex(); 17 | 18 | // Ch08_02_misc.cpp 19 | extern void print_buckets(const char* msg, const uno_mset_t& colors); 20 | #endif 21 | -------------------------------------------------------------------------------- /Chapter08/Ch08_02/Ch08_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter08/Ch08_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch08_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp ${PROJNAME}_misc.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter08/Ch08_03/Ch08_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter08/Ch08_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch08_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp ${PROJNAME}_misc.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter08/Ch08_04/Ch08_04.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch08_04.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch08_04.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch08_04 -----"); 15 | Ch08_04_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter08/Ch08_04/Ch08_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter08/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter08/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter08/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch08_01\%CONFIG%\Ch08_01 6 | %BDIR%\Ch08_02\%CONFIG%\Ch08_02 7 | %BDIR%\Ch08_03\%CONFIG%\Ch08_03 8 | %BDIR%\Ch08_04\%CONFIG%\Ch08_04 9 | -------------------------------------------------------------------------------- /Chapter08/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch08_01/Ch08_01 10 | $BDIR/Ch08_02/Ch08_02 11 | $BDIR/Ch08_03/Ch08_03 12 | $BDIR/Ch08_04/Ch08_04 13 | -------------------------------------------------------------------------------- /Chapter09/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter09) 4 | add_subdirectory("./Ch09_01") 5 | add_subdirectory("./Ch09_02") 6 | add_subdirectory("./Ch09_03") 7 | add_subdirectory("./Ch09_04") 8 | add_subdirectory("./Ch09_05") 9 | 10 | -------------------------------------------------------------------------------- /Chapter09/Ch09_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch09_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp TowerOfHanoi.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter09/Ch09_01/Ch09_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch09_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH09_01_H_ 6 | #define CH09_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch09_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter09/Ch09_01/Ch09_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter09/Ch09_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch09_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter09/Ch09_02/Ch09_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch09_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH09_02_H_ 6 | #define CH09_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch09_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter09/Ch09_02/Ch09_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter09/Ch09_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch09_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/RegPolygon.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter09/Ch09_03/Ch09_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch09_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH09_03_H_ 6 | #define CH09_03_H_ 7 | #include "Common.h" 8 | 9 | // Ch09_03_ex.cpp 10 | extern void Ch09_03_ex(); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /Chapter09/Ch09_03/Ch09_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter09/Ch09_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch09_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter09/Ch09_04/Ch09_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch09_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH09_04_H_ 6 | #define CH09_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch09_04_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter09/Ch09_04/Ch09_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter09/Ch09_05/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch09_05) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter09/Ch09_05/Ch09_05.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch09_05.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH09_05_H_ 6 | #define CH09_05_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch09_05_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter09/Ch09_05/Ch09_05.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter09/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter09/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter09/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch09_01\%CONFIG%\Ch09_01 6 | %BDIR%\Ch09_02\%CONFIG%\Ch09_02 7 | %BDIR%\Ch09_03\%CONFIG%\Ch09_03 8 | %BDIR%\Ch09_04\%CONFIG%\Ch09_04 9 | %BDIR%\Ch09_05\%CONFIG%\Ch09_05 10 | -------------------------------------------------------------------------------- /Chapter09/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch09_01/Ch09_01 10 | $BDIR/Ch09_02/Ch09_02 11 | $BDIR/Ch09_03/Ch09_03 12 | $BDIR/Ch09_04/Ch09_04 13 | $BDIR/Ch09_05/Ch09_05 14 | -------------------------------------------------------------------------------- /Chapter10/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter10) 4 | add_subdirectory("./Ch10_01") 5 | add_subdirectory("./Ch10_02") 6 | add_subdirectory("./Ch10_03") 7 | add_subdirectory("./Ch10_04") 8 | add_subdirectory("./Ch10_05") 9 | add_subdirectory("./Ch10_06") 10 | add_subdirectory("./Ch10_07") 11 | add_subdirectory("./Ch10_08") 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch10_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/AminoAcid.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_01/Ch10_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch10_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH10_01_H_ 6 | #define CH10_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch10_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_01/Ch10_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter10/Ch10_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch10_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Nut.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_02/Ch10_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch10_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH10_02_H_ 6 | #define CH10_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch10_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_02/Ch10_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter10/Ch10_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch10_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Rect.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_03/Ch10_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch10_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH10_03_H_ 6 | #define CH10_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch10_03_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_03/Ch10_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter10/Ch10_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch10_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Image.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_04/Ch10_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch10_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH10_04_H_ 6 | #define CH10_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch10_04_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_04/Ch10_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter10/Ch10_05/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch10_05) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_05/Ch10_05.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch10_05.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH10_05_H_ 6 | #define CH10_05_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch10_05_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_05/Ch10_05.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter10/Ch10_06/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch10_06) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_06/Ch10_06.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch10_06.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH10_06_H_ 6 | #define CH10_06_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch10_06_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_06/Ch10_06.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter10/Ch10_07/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch10_07) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_07/Ch10_07.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch10_07.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch10_07.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch10_07 -----"); 15 | Ch10_07_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter10/Ch10_07/Ch10_07.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch10_07.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH10_07_H_ 6 | #define CH10_07_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch10_07_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_07/Ch10_07.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter10/Ch10_08/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch10_08) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Rect.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_08/Ch10_08.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch10_08.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH10_08_H_ 6 | #define CH10_08_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch10_08_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter10/Ch10_08/Ch10_08.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter10/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter10/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter10/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch10_01\%CONFIG%\Ch10_01 6 | %BDIR%\Ch10_02\%CONFIG%\Ch10_02 7 | %BDIR%\Ch10_03\%CONFIG%\Ch10_03 8 | %BDIR%\Ch10_04\%CONFIG%\Ch10_04 9 | %BDIR%\Ch10_05\%CONFIG%\Ch10_05 10 | %BDIR%\Ch10_06\%CONFIG%\Ch10_06 11 | %BDIR%\Ch10_07\%CONFIG%\Ch10_07 12 | %BDIR%\Ch10_08\%CONFIG%\Ch10_08 13 | -------------------------------------------------------------------------------- /Chapter10/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch10_01/Ch10_01 10 | $BDIR/Ch10_02/Ch10_02 11 | $BDIR/Ch10_03/Ch10_03 12 | $BDIR/Ch10_04/Ch10_04 13 | $BDIR/Ch10_05/Ch10_05 14 | $BDIR/Ch10_06/Ch10_06 15 | $BDIR/Ch10_07/Ch10_07 16 | $BDIR/Ch10_08/Ch10_08 17 | -------------------------------------------------------------------------------- /Chapter11/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter11) 4 | add_subdirectory("./Ch11_01") 5 | add_subdirectory("./Ch11_02") 6 | add_subdirectory("./Ch11_03") 7 | add_subdirectory("./Ch11_04") 8 | add_subdirectory("./Ch11_05") 9 | add_subdirectory("./Ch11_06") 10 | add_subdirectory("./Ch11_07") 11 | add_subdirectory("./Ch11_08") 12 | -------------------------------------------------------------------------------- /Chapter11/Ch11_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch11_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter11/Ch11_01/Ch11_01.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch11_01.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch11_01.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch11_01 -----"); 15 | Ch11_01_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter11/Ch11_01/Ch11_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch11_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH11_01_H_ 6 | #define CH11_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch11_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter11/Ch11_01/Ch11_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter11/Ch11_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch11_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/AminoAcid.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter11/Ch11_02/Ch11_02.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch11_02.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch11_02.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch11_02 -----"); 15 | Ch11_02_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter11/Ch11_02/Ch11_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch11_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH11_02_H_ 6 | #define CH11_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch11_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter11/Ch11_02/Ch11_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter11/Ch11_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch11_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/MF.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter11/Ch11_03/Ch11_03.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch11_03.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch11_03.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch11_03 -----"); 15 | Ch11_03_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter11/Ch11_03/Ch11_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch11_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH11_03_H_ 6 | #define CH11_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch11_03_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter11/Ch11_03/Ch11_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter11/Ch11_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch11_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Airport.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter11/Ch11_04/Ch11_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch11_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH11_04_H_ 6 | #define CH11_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch11_04_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter11/Ch11_04/Ch11_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter11/Ch11_05/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch11_05) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Mineral.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter11/Ch11_05/Ch11_05.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch11_05.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch11_05.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch11_05 -----"); 15 | Ch11_05_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter11/Ch11_05/Ch11_05.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch11_05.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH11_05_H_ 6 | #define CH11_05_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch11_05_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter11/Ch11_05/Ch11_05.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter11/Ch11_06/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch11_06) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/AminoAcid.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter11/Ch11_06/Ch11_06.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch11_06.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch11_06.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch11_06 -----"); 15 | Ch11_06_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter11/Ch11_06/Ch11_06.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch11_06.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH11_06_H_ 6 | #define CH11_06_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch11_06_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter11/Ch11_06/Ch11_06.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter11/Ch11_07/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch11_07) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/HtmlColor.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter11/Ch11_07/Ch11_07.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch11_07.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch11_07.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch11_07 -----"); 15 | Ch11_07_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter11/Ch11_07/Ch11_07.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch11_07.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH11_07_H_ 6 | #define CH11_07_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch11_07_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter11/Ch11_07/Ch11_07.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter11/Ch11_08/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch11_08) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/MF.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter11/Ch11_08/Ch11_08.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch11_08.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch11_08.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch11_08 -----"); 15 | Ch11_08_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter11/Ch11_08/Ch11_08.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch11_08.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH11_08_H_ 6 | #define CH11_08_H_ 7 | #include "Common.h" 8 | 9 | // Ch11_08_ex.cpp() 10 | extern void Ch11_08_ex(); 11 | 12 | // Ch11_08_misc.cpp() 13 | extern void Ch11_08_misc(); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /Chapter11/Ch11_08/Ch11_08.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter11/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter11/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter11/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch11_01\%CONFIG%\Ch11_01 6 | %BDIR%\Ch11_02\%CONFIG%\Ch11_02 7 | %BDIR%\Ch11_03\%CONFIG%\Ch11_03 8 | %BDIR%\Ch11_04\%CONFIG%\Ch11_04 9 | %BDIR%\Ch11_05\%CONFIG%\Ch11_05 10 | %BDIR%\Ch11_06\%CONFIG%\Ch11_06 11 | %BDIR%\Ch11_07\%CONFIG%\Ch11_07 12 | %BDIR%\Ch11_08\%CONFIG%\Ch11_08 13 | -------------------------------------------------------------------------------- /Chapter11/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch11_01/Ch11_01 10 | $BDIR/Ch11_02/Ch11_02 11 | $BDIR/Ch11_03/Ch11_03 12 | $BDIR/Ch11_04/Ch11_04 13 | $BDIR/Ch11_05/Ch11_05 14 | $BDIR/Ch11_06/Ch11_06 15 | $BDIR/Ch11_07/Ch11_07 16 | $BDIR/Ch11_08/Ch11_08 17 | -------------------------------------------------------------------------------- /Chapter12/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter12) 4 | add_subdirectory("./Ch12_01") 5 | add_subdirectory("./Ch12_02") 6 | add_subdirectory("./Ch12_03") 7 | add_subdirectory("./Ch12_04") 8 | -------------------------------------------------------------------------------- /Chapter12/Ch12_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch12_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Airport.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter12/Ch12_01/Ch12_01.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch12_01.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch12_01.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch12_01 -----"); 15 | Ch12_01_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter12/Ch12_01/Ch12_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch12_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH12_01_H_ 6 | #define CH12_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch12_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter12/Ch12_01/Ch12_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter12/Ch12_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch12_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Airport.cpp ${COMMON_DIR}/AminoAcid.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter12/Ch12_02/Ch12_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch12_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH12_02_H_ 6 | #define CH12_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch12_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter12/Ch12_02/Ch12_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter12/Ch12_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch12_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter12/Ch12_03/Ch12_03.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch12_03.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch12_03.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch12_03 -----"); 15 | Ch12_03_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter12/Ch12_03/Ch12_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch12_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH12_03_H_ 6 | #define CH12_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch12_03_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter12/Ch12_03/Ch12_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter12/Ch12_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch12_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter12/Ch12_04/Ch12_04.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch12_04.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch12_04.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch12_04 -----"); 15 | Ch12_04_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter12/Ch12_04/Ch12_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch12_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH12_04_H_ 6 | #define CH12_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch12_04_ex(); 10 | 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Chapter12/Ch12_04/Ch12_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter12/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter12/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter12/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch12_01\%CONFIG%\Ch12_01 6 | %BDIR%\Ch12_02\%CONFIG%\Ch12_02 7 | %BDIR%\Ch12_03\%CONFIG%\Ch12_03 8 | %BDIR%\Ch12_04\%CONFIG%\Ch12_04 9 | -------------------------------------------------------------------------------- /Chapter12/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch12_01/Ch12_01 10 | $BDIR/Ch12_02/Ch12_02 11 | $BDIR/Ch12_03/Ch12_03 12 | $BDIR/Ch12_04/Ch12_04 13 | -------------------------------------------------------------------------------- /Chapter13/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter13) 4 | add_subdirectory("./Ch13_01") 5 | add_subdirectory("./Ch13_02") 6 | add_subdirectory("./Ch13_03") 7 | add_subdirectory("./Ch13_04") 8 | add_subdirectory("./Ch13_05") 9 | -------------------------------------------------------------------------------- /Chapter13/Ch13_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch13_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/RegPolygon.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter13/Ch13_01/Ch13_01.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch13_01.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch13_01.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch13_01 -----"); 15 | Ch13_01_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter13/Ch13_01/Ch13_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch13_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH13_01_H_ 6 | #define CH13_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch13_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter13/Ch13_01/Ch13_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter13/Ch13_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch13_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/AminoAcid.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter13/Ch13_02/Ch13_02.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch13_02.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch13_02.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch13_02 -----"); 15 | Ch13_02_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter13/Ch13_02/Ch13_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch13_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH13_02_H_ 6 | #define CH13_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch13_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter13/Ch13_02/Ch13_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter13/Ch13_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch13_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter13/Ch13_03/Ch13_03.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch13_03.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch13_03.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch13_03 -----"); 15 | Ch13_03_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter13/Ch13_03/Ch13_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch13_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH13_03_H_ 6 | #define CH13_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch13_03_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter13/Ch13_03/Ch13_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter13/Ch13_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch13_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/HtmlColor.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter13/Ch13_04/Ch13_04.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch13_04.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch13_04.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch13_04 -----"); 15 | Ch13_04_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter13/Ch13_04/Ch13_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch13_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH13_04_H_ 6 | #define CH13_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch13_04_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter13/Ch13_04/Ch13_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter13/Ch13_05/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch13_05) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/HtmlColor.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter13/Ch13_05/Ch13_05.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch13_05.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch13_05.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch13_05 -----"); 15 | Ch13_05_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter13/Ch13_05/Ch13_05.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch13_05.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH13_05_H_ 6 | #define CH13_05_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch13_05_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter13/Ch13_05/Ch13_05.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter13/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter13/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter13/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch13_01\%CONFIG%\Ch13_01 6 | %BDIR%\Ch13_02\%CONFIG%\Ch13_02 7 | %BDIR%\Ch13_03\%CONFIG%\Ch13_03 8 | %BDIR%\Ch13_04\%CONFIG%\Ch13_04 9 | %BDIR%\Ch13_05\%CONFIG%\Ch13_05 10 | -------------------------------------------------------------------------------- /Chapter13/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch13_01/Ch13_01 10 | $BDIR/Ch13_02/Ch13_02 11 | $BDIR/Ch13_03/Ch13_03 12 | $BDIR/Ch13_04/Ch13_04 13 | $BDIR/Ch13_05/Ch13_05 14 | -------------------------------------------------------------------------------- /Chapter14/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter14) 4 | add_subdirectory("./Ch14_01") 5 | add_subdirectory("./Ch14_02") 6 | add_subdirectory("./Ch14_03") 7 | add_subdirectory("./Ch14_04") 8 | add_subdirectory("./Ch14_05") 9 | -------------------------------------------------------------------------------- /Chapter14/Ch14_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch14_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter14/Ch14_01/Ch14_01.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch14_01.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch14_01.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch14_01 -----"); 15 | Ch14_01_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter14/Ch14_01/Ch14_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch14_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH14_01_H_ 6 | #define CH14_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch14_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter14/Ch14_01/Ch14_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter14/Ch14_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch14_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter14/Ch14_02/Ch14_02.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch14_02.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch14_02.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch14_02 -----"); 15 | Ch14_02_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter14/Ch14_02/Ch14_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch14_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH14_02_H_ 6 | #define CH14_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch14_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter14/Ch14_02/Ch14_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter14/Ch14_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch14_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Mineral.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter14/Ch14_03/Ch14_03.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch14_03.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch14_03.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch14_03 -----"); 15 | Ch14_03_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter14/Ch14_03/Ch14_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch14_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH14_03_H_ 6 | #define CH14_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch14_03_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter14/Ch14_03/Ch14_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter14/Ch14_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch14_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/HtmlColor.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter14/Ch14_04/Ch14_04.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch14_04.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch14_04.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch14_04 -----"); 15 | Ch14_04_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter14/Ch14_04/Ch14_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch14_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH14_04_H_ 6 | #define CH14_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch14_04_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter14/Ch14_04/Ch14_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter14/Ch14_05/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch14_05) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter14/Ch14_05/Ch14_05.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch14_05.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch14_05.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch14_05 -----"); 15 | Ch14_05_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter14/Ch14_05/Ch14_05.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch14_05.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH14_05_H_ 6 | #define CH14_05_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch14_05_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter14/Ch14_05/Ch14_05.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter14/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter14/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter14/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch14_01\%CONFIG%\Ch14_01 6 | %BDIR%\Ch14_02\%CONFIG%\Ch14_02 7 | %BDIR%\Ch14_03\%CONFIG%\Ch14_03 8 | %BDIR%\Ch14_04\%CONFIG%\Ch14_04 9 | %BDIR%\Ch14_05\%CONFIG%\Ch14_05 10 | -------------------------------------------------------------------------------- /Chapter14/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch14_01/Ch14_01 10 | $BDIR/Ch14_02/Ch14_02 11 | $BDIR/Ch14_03/Ch14_03 12 | $BDIR/Ch14_04/Ch14_04 13 | $BDIR/Ch14_05/Ch14_05 14 | -------------------------------------------------------------------------------- /Chapter15/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter15) 4 | add_subdirectory("./Ch15_01") 5 | add_subdirectory("./Ch15_02") 6 | add_subdirectory("./Ch15_03") 7 | add_subdirectory("./Ch15_04") 8 | add_subdirectory("./Ch15_05") 9 | -------------------------------------------------------------------------------- /Chapter15/Ch15_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch15_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/AminoAcid.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter15/Ch15_01/Ch15_01.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch15_01.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch15_01.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch15_01 -----"); 15 | Ch15_01_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter15/Ch15_01/Ch15_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch15_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH15_01_H_ 6 | #define CH15_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch15_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter15/Ch15_01/Ch15_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter15/Ch15_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch15_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/AminoAcid.cpp ${COMMON_DIR}/MF.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter15/Ch15_02/Ch15_02.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch15_02.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch15_02.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch15_02 -----"); 15 | Ch15_02_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter15/Ch15_02/Ch15_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch15_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH15_02_H_ 6 | #define CH15_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch15_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter15/Ch15_02/Ch15_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter15/Ch15_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch15_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/AminoAcid.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter15/Ch15_03/Ch15_03.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch15_03.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch15_03.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch15_03 -----"); 15 | Ch15_03_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter15/Ch15_03/Ch15_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch15_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH15_03_H_ 6 | #define CH15_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch15_03_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter15/Ch15_03/Ch15_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter15/Ch15_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch15_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter15/Ch15_04/Ch15_04.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch15_04.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch15_04.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch15_04 -----"); 15 | Ch15_04_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter15/Ch15_04/Ch15_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch15_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH15_04_H_ 6 | #define CH15_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch15_04_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter15/Ch15_04/Ch15_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter15/Ch15_05/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch15_05) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter15/Ch15_05/Ch15_05.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch15_05.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch15_05.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch15_05 -----"); 15 | Ch15_05_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter15/Ch15_05/Ch15_05.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch15_05.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH15_05_H_ 6 | #define CH15_05_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch15_05_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter15/Ch15_05/Ch15_05.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter15/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter15/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter15/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch15_01\%CONFIG%\Ch15_01 6 | %BDIR%\Ch15_02\%CONFIG%\Ch15_02 7 | %BDIR%\Ch15_03\%CONFIG%\Ch15_03 8 | %BDIR%\Ch15_04\%CONFIG%\Ch15_04 9 | %BDIR%\Ch15_05\%CONFIG%\Ch15_05 10 | -------------------------------------------------------------------------------- /Chapter15/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch15_01/Ch15_01 10 | $BDIR/Ch15_02/Ch15_02 11 | $BDIR/Ch15_03/Ch15_03 12 | $BDIR/Ch15_04/Ch15_04 13 | $BDIR/Ch15_05/Ch15_05 14 | -------------------------------------------------------------------------------- /Chapter16/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter16) 4 | add_subdirectory("./Ch16_01") 5 | add_subdirectory("./Ch16_02") 6 | add_subdirectory("./Ch16_03") 7 | add_subdirectory("./Ch16_04") 8 | add_subdirectory("./Ch16_05") 9 | -------------------------------------------------------------------------------- /Chapter16/Ch16_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch16_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter16/Ch16_01/Ch16_01.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch16_01.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch16_01.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch16_01 -----"); 15 | Ch16_01_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter16/Ch16_01/Ch16_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch16_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH16_01_H_ 6 | #define CH16_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch16_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter16/Ch16_01/Ch16_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter16/Ch16_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch16_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter16/Ch16_02/Ch16_02.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch16_02.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch16_02.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch16_02 -----"); 15 | Ch16_02_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter16/Ch16_02/Ch16_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch16_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH16_02_H_ 6 | #define CH16_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch16_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter16/Ch16_02/Ch16_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter16/Ch16_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch16_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter16/Ch16_03/Ch16_03.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch16_03.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch16_03.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch16_03 -----"); 15 | Ch16_03_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter16/Ch16_03/Ch16_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch16_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH16_03_H_ 6 | #define CH16_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch16_03_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter16/Ch16_03/Ch16_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter16/Ch16_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch16_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter16/Ch16_04/Ch16_04.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch16_04.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch16_04.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch16_04 -----"); 15 | Ch16_04_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter16/Ch16_04/Ch16_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch16_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH16_04_H_ 6 | #define CH16_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch16_04_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter16/Ch16_04/Ch16_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter16/Ch16_05/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch16_05) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter16/Ch16_05/Ch16_05.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch16_05.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch16_05.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch16_05 -----"); 15 | Ch16_05_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter16/Ch16_05/Ch16_05.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch16_05.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH16_05_H_ 6 | #define CH16_05_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch16_05_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter16/Ch16_05/Ch16_05.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter16/Ch16_05_ex1_results-lin.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/Practical-CPP-STL-Programming/2b44ac522ab58de600712dca46859fe8e30d36ea/Chapter16/Ch16_05_ex1_results-lin.xlsx -------------------------------------------------------------------------------- /Chapter16/Ch16_05_ex1_results-win.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/Practical-CPP-STL-Programming/2b44ac522ab58de600712dca46859fe8e30d36ea/Chapter16/Ch16_05_ex1_results-win.xlsx -------------------------------------------------------------------------------- /Chapter16/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter16/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter16/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch16_01\%CONFIG%\Ch16_01 6 | %BDIR%\Ch16_02\%CONFIG%\Ch16_02 7 | %BDIR%\Ch16_03\%CONFIG%\Ch16_03 8 | %BDIR%\Ch16_04\%CONFIG%\Ch16_04 9 | %BDIR%\Ch16_05\%CONFIG%\Ch16_05 10 | -------------------------------------------------------------------------------- /Chapter16/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch16_01/Ch16_01 10 | $BDIR/Ch16_02/Ch16_02 11 | $BDIR/Ch16_03/Ch16_03 12 | $BDIR/Ch16_04/Ch16_04 13 | $BDIR/Ch16_05/Ch16_05 14 | -------------------------------------------------------------------------------- /Chapter17/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter17) 4 | add_subdirectory("./Ch17_01") 5 | add_subdirectory("./Ch17_02") 6 | add_subdirectory("./Ch17_03") 7 | add_subdirectory("./Ch17_04") 8 | -------------------------------------------------------------------------------- /Chapter17/Ch17_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch17_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/MF.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter17/Ch17_01/Ch17_01.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch17_01.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch17_01.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch17_01 -----"); 15 | Ch17_01_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter17/Ch17_01/Ch17_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch17_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef Ch17_01_H_ 6 | #define Ch17_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch17_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter17/Ch17_01/Ch17_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter17/Ch17_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch17_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/MF.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter17/Ch17_02/Ch17_02.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch17_02.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include "Ch17_02.h" 7 | 8 | int main(int, char** argv) 9 | { 10 | int rc {}; 11 | 12 | try 13 | { 14 | std::println("\n----- Results for example Ch17_02 -----"); 15 | Ch17_02_ex(); 16 | } 17 | 18 | catch (const std::exception& ex) 19 | { 20 | rc = 1; 21 | std::println("Exception occurred in program {:s}", argv[0]); 22 | std::println("{:s}", ex.what()); 23 | } 24 | 25 | return rc; 26 | } 27 | -------------------------------------------------------------------------------- /Chapter17/Ch17_02/Ch17_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch17_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH17_02_H_ 6 | #define CH17_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch17_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter17/Ch17_02/Ch17_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter17/Ch17_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch17_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/MF.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter17/Ch17_03/Ch17_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch17_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH17_03_H_ 6 | #define CH17_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch17_03_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter17/Ch17_03/Ch17_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter17/Ch17_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch17_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/MF.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter17/Ch17_04/Ch17_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch17_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH17_04_H_ 6 | #define CH17_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch17_04_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter17/Ch17_04/Ch17_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter17/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter17/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter17/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch17_01\%CONFIG%\Ch17_01 6 | %BDIR%\Ch17_02\%CONFIG%\Ch17_02 7 | %BDIR%\Ch17_03\%CONFIG%\Ch17_03 8 | %BDIR%\Ch17_04\%CONFIG%\Ch17_04 9 | -------------------------------------------------------------------------------- /Chapter17/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch17_01/Ch17_01 10 | $BDIR/Ch17_02/Ch17_02 11 | $BDIR/Ch17_03/Ch17_03 12 | $BDIR/Ch17_04/Ch17_04 13 | -------------------------------------------------------------------------------- /Chapter18/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter18) 4 | add_subdirectory("./Ch18_01") 5 | add_subdirectory("./Ch18_02") 6 | add_subdirectory("./Ch18_03") 7 | add_subdirectory("./Ch18_04") 8 | add_subdirectory("./Ch18_05") 9 | -------------------------------------------------------------------------------- /Chapter18/Ch18_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch18_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter18/Ch18_01/Ch18_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch18_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH18_01_H_ 6 | #define CH18_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch18_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter18/Ch18_01/Ch18_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter18/Ch18_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch18_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter18/Ch18_02/Ch18_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch18_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH18_02_H_ 6 | #define CH18_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch18_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter18/Ch18_02/Ch18_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter18/Ch18_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch18_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${PROJNAME}_misc.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter18/Ch18_03/Ch18_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch18_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH18_03_H_ 6 | #define CH18_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch18_03_ex(); 10 | extern void Ch18_03_misc(); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /Chapter18/Ch18_03/Ch18_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter18/Ch18_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch18_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/DiceSet.cpp ${COMMON_DIR}/AminoAcid.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter18/Ch18_04/Ch18_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch18_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH18_04_H_ 6 | #define CH18_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch18_04_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter18/Ch18_04/Ch18_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter18/Ch18_05/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch18_05) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter18/Ch18_05/Ch18_05.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch18_05.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH18_05_H_ 6 | #define CH18_05_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch18_05_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter18/Ch18_05/Ch18_05.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter18/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter18/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter18/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch18_01\%CONFIG%\Ch18_01 6 | %BDIR%\Ch18_02\%CONFIG%\Ch18_02 7 | %BDIR%\Ch18_03\%CONFIG%\Ch18_03 8 | %BDIR%\Ch18_04\%CONFIG%\Ch18_04 9 | %BDIR%\Ch18_05\%CONFIG%\Ch18_05 10 | -------------------------------------------------------------------------------- /Chapter18/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch18_01/Ch18_01 10 | $BDIR/Ch18_02/Ch18_02 11 | $BDIR/Ch18_03/Ch18_03 12 | $BDIR/Ch18_04/Ch18_04 13 | $BDIR/Ch18_05/Ch18_05 14 | -------------------------------------------------------------------------------- /Chapter19/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter19) 4 | add_subdirectory("./Ch19_01") 5 | add_subdirectory("./Ch19_02") 6 | add_subdirectory("./Ch19_03") 7 | add_subdirectory("./Ch19_04") 8 | add_subdirectory("./Ch19_05") 9 | -------------------------------------------------------------------------------- /Chapter19/Ch19_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch19_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter19/Ch19_01/Ch19_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch19_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH19_01_H_ 6 | #define CH19_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch19_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter19/Ch19_01/Ch19_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter19/Ch19_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch19_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter19/Ch19_02/Ch19_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch19_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH19_02_H_ 6 | #define CH19_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch19_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter19/Ch19_02/Ch19_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter19/Ch19_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch19_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter19/Ch19_03/Ch19_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch19_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH19_03_H_ 6 | #define CH19_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch19_03_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter19/Ch19_03/Ch19_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter19/Ch19_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch19_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter19/Ch19_04/Ch19_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch19_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH19_04_H_ 6 | #define CH19_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch19_04_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter19/Ch19_04/Ch19_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter19/Ch19_05/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch19_05) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter19/Ch19_05/Ch19_05.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch19_05.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH19_05_H_ 6 | #define CH19_05_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch19_05_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter19/Ch19_05/Ch19_05.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter19/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter19/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter19/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch19_01\%CONFIG%\Ch19_01 6 | %BDIR%\Ch19_02\%CONFIG%\Ch19_02 7 | %BDIR%\Ch19_03\%CONFIG%\Ch19_03 8 | %BDIR%\Ch19_04\%CONFIG%\Ch19_04 9 | %BDIR%\Ch19_05\%CONFIG%\Ch19_05 10 | -------------------------------------------------------------------------------- /Chapter19/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch19_01/Ch19_01 10 | $BDIR/Ch19_02/Ch19_02 11 | $BDIR/Ch19_03/Ch19_03 12 | $BDIR/Ch19_04/Ch19_04 13 | $BDIR/Ch19_05/Ch19_05 14 | -------------------------------------------------------------------------------- /Chapter20/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter20) 4 | add_subdirectory("./Ch20_01") 5 | add_subdirectory("./Ch20_02") 6 | add_subdirectory("./Ch20_03") 7 | add_subdirectory("./Ch20_04") 8 | add_subdirectory("./Ch20_05") 9 | -------------------------------------------------------------------------------- /Chapter20/Ch20_01/Ch20_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch20_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH20_01_H_ 6 | #define CH20_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch20_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter20/Ch20_01/Ch20_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter20/Ch20_02/Ch20_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch20_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH20_02_H_ 6 | #define CH20_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch20_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter20/Ch20_02/Ch20_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter20/Ch20_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch20_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter20/Ch20_03/Ch20_03.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch20_03.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH20_03_H_ 6 | #define CH20_03_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch20_03_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter20/Ch20_03/Ch20_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter20/Ch20_04/Ch20_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch20_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH20_04_H_ 6 | #define CH20_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch20_04_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter20/Ch20_04/Ch20_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter20/Ch20_05/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch20_05) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter20/Ch20_05/Ch20_05.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch20_05.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH20_05_H_ 6 | #define CH20_05_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch20_05_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter20/Ch20_05/Ch20_05.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter20/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter20/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter20/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch20_01\%CONFIG%\Ch20_01 6 | %BDIR%\Ch20_02\%CONFIG%\Ch20_02 7 | %BDIR%\Ch20_03\%CONFIG%\Ch20_03 8 | %BDIR%\Ch20_04\%CONFIG%\Ch20_04 9 | %BDIR%\Ch20_05\%CONFIG%\Ch20_05 10 | -------------------------------------------------------------------------------- /Chapter20/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch20_01/Ch20_01 10 | $BDIR/Ch20_02/Ch20_02 11 | $BDIR/Ch20_03/Ch20_03 12 | $BDIR/Ch20_04/Ch20_04 13 | $BDIR/Ch20_05/Ch20_05 14 | -------------------------------------------------------------------------------- /Chapter21/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | project(Chapter21) 4 | add_subdirectory("./Ch21_01") 5 | add_subdirectory("./Ch21_02") 6 | add_subdirectory("./Ch21_03") 7 | add_subdirectory("./Ch21_04") 8 | add_subdirectory("./Ch21_05") 9 | -------------------------------------------------------------------------------- /Chapter21/Ch21_01/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch21_01) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter21/Ch21_01/Ch21_01.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch21_01.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH21_01_H_ 6 | #define CH21_01_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch21_01_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter21/Ch21_01/Ch21_01.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter21/Ch21_02/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch21_02) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter21/Ch21_02/Ch21_02.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch21_02.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH21_02_H_ 6 | #define CH21_02_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch21_02_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter21/Ch21_02/Ch21_02.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter21/Ch21_03/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch21_03) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp ${PROJNAME}_misc.cpp) 8 | set(CPPFILES_EXTRA ${COMMON_DIR}/Airport.cpp) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter21/Ch21_03/Ch21_03.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter21/Ch21_04/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch21_04) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter21/Ch21_04/Ch21_04.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch21_04.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH21_04_H_ 6 | #define CH21_04_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch21_04_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter21/Ch21_04/Ch21_04.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter21/Ch21_05/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.27) 2 | 3 | set(PROJNAME Ch21_05) 4 | project(${PROJNAME} CXX) 5 | include("../../CM/settings.cmake") 6 | 7 | set(CPPFILES ${PROJNAME}.cpp ${PROJNAME}_ex.cpp) 8 | set(CPPFILES_EXTRA) 9 | 10 | add_executable(${PROJNAME} ${CPPFILES} ${CPPFILES_EXTRA}) 11 | target_include_directories(${PROJNAME} PRIVATE ${COMMON_DIR}) 12 | -------------------------------------------------------------------------------- /Chapter21/Ch21_05/Ch21_05.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // Ch21_05.h 3 | //----------------------------------------------------------------------------- 4 | 5 | #ifndef CH21_05_H_ 6 | #define CH21_05_H_ 7 | #include "Common.h" 8 | 9 | extern void Ch21_05_ex(); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Chapter21/Ch21_05/Ch21_05.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Chapter21/mk.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem see cm-win.bat for usage information 4 | call ..\CM\cm-win.bat %1 %2 %3 %4 5 | -------------------------------------------------------------------------------- /Chapter21/mk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # see cm-lin.sh for usage information 4 | ../CM/cm-lin.sh $1 $2 $3 5 | -------------------------------------------------------------------------------- /Chapter21/r.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if "%1" == "" (set BDIR=build-msvc) else (set BDIR=%1) 3 | if "%2" == "" (set CONFIG=Release) else (set CONFIG=%2) 4 | 5 | %BDIR%\Ch21_01\%CONFIG%\Ch21_01 6 | %BDIR%\Ch21_02\%CONFIG%\Ch21_02 7 | %BDIR%\Ch21_03\%CONFIG%\Ch21_03 8 | %BDIR%\Ch21_04\%CONFIG%\Ch21_04 9 | %BDIR%\Ch21_05\%CONFIG%\Ch21_05 10 | -------------------------------------------------------------------------------- /Chapter21/r.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "" ]; then 4 | BDIR="build" 5 | else 6 | BDIR=$1 7 | fi 8 | 9 | $BDIR/Ch21_01/Ch21_01 10 | $BDIR/Ch21_02/Ch21_02 11 | $BDIR/Ch21_03/Ch21_03 12 | $BDIR/Ch21_04/Ch21_04 13 | $BDIR/Ch21_05/Ch21_05 14 | -------------------------------------------------------------------------------- /Common/RGB.cpp: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // RGB.cpp 3 | //----------------------------------------------------------------------------- 4 | 5 | #include 6 | #include 7 | #include "RGB.h" 8 | 9 | std::string RGB::to_str(bool use_hex) const 10 | { 11 | std::string s {}; 12 | 13 | if (use_hex) 14 | { 15 | uint32_t c = ValUint(); 16 | std::format_to(std::back_inserter(s), "0x{:06X}", c); 17 | } 18 | else 19 | { 20 | std::format_to(std::back_inserter(s), "({:3d},{:3d},{:3d})", 21 | m_R, m_G, m_B); 22 | } 23 | 24 | return s; 25 | } 26 | -------------------------------------------------------------------------------- /Doc/ImportantNotes.txt: -------------------------------------------------------------------------------- 1 | The sole purpose of the source code is to elucidate programming examples 2 | that are directly related to the topics discussed in this book. 3 | Minimal attention is given to essential software engineering concerns 4 | such as robust error handling, security risks, numerical stability, 5 | rounding errors, or ill-conditioned functions. You are responsible 6 | for addressing these concerns should you decide to use any of the 7 | source code in your own programs. 8 | 9 | The Common folder contains shared C++ files. This code/data should not be used 10 | for other purposes without proper modifications. 11 | 12 | The CM folder contains files used by CMake. 13 | -------------------------------------------------------------------------------- /Doc/ReleaseHistory.txt: -------------------------------------------------------------------------------- 1 | 2024-09-12 2 | ---------- 3 | Initial release for publication. 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Apress Source Code 2 | 3 | This repository accompanies [*Practical C++ STL Programming*](https://www.link.springer.com/book/10.1007/979-8-8688-0774-9) by Daniel Kusswurm (Apress, 2024). 4 | 5 | [comment]: #cover 6 | ![Cover image](979-8-8688-0773-2.jpg) 7 | 8 | Download the files as a zip using the green button, or clone the repository to your machine using Git. 9 | 10 | ## Releases 11 | 12 | Release v1.0 corresponds to the code in the published book, without corrections or updates. 13 | 14 | ## Contributions 15 | 16 | See the file Contributing.md for more information on how you can contribute to this repository. --------------------------------------------------------------------------------