listings-Chap21-README.md
Listings of Chap21.docx
This is linked summary of the listings. You can also view it on one page.
- Listing 21.1: Lines containing preprocessor directives start with a #.
- Book: lst-0001-book.cpp
- Godbolt: lst-0001-godb.cpp, https://godbolt.org/z/j6WWxPheP
- Listing 21.2: Your main file with “main” includes the header file via “#include”.
- Book: lst-0002-book.cpp
- Godbolt: lst-0002-godb.cpp, https://godbolt.org/z/feGrM4f6j
- Listing 21.3: The result of the preprocessor run.
- Book: lst-0007-book.cpp
- Godbolt: lst-0007-godb.cpp, https://godbolt.org/z/W45G5TjTz
- Listing 21.5: The purely textual substitution leads to multiple executions in macros.
- Book: lst-0015-book.cpp
- Godbolt: lst-0015-godb.cpp, https://godbolt.org/z/jzKfabPh3
- GodboltId:YzYz3x1zx
- Book: lst-0017-book.cpp
- Godbolt: lst-0017-godb.cpp, https://godbolt.org/z/YzYz3x1zx
- GodboltId:5zrfvovaW
- Book: lst-0018-book.cpp
- Godbolt: lst-0018-godb.cpp, https://godbolt.org/z/5zrfvovaW
- GodboltId:6xzTx83zE
- Book: lst-0019-book.cpp
- Godbolt: lst-0019-godb.cpp, https://godbolt.org/z/6xzTx83zE
- Listing 21.6: A simple function template is much better than a macro.
- Book: lst-0020-book.cpp
- Godbolt: lst-0020-godb.cpp, https://godbolt.org/z/acMjvxcM5