listings-Chap27-README.md
Listings of Chap27.docx
This is linked summary of the listings. You can also view it on one page.
- Listing 27.1: Returning the stream by reference allows chaining.
- Book: lst-0003-book.cpp
- Godbolt: lst-0003-godb.cpp, https://godbolt.org/z/WaEGdnWvq
- Listing 27.2: Unformatted input from streams.
- Book: lst-0005-book.cpp
- Godbolt: lst-0005-godb.cpp, https://godbolt.org/z/MaEzcccTG
- Listing 27.3: State checks for streams.
- Book: lst-0007-book.cpp
- Godbolt: lst-0007-godb.cpp, https://godbolt.org/z/exKMv8646
- Listing 27.4: Operator “bool” of streams.
- Book: lst-0008-book.cpp
- Godbolt: lst-0008-godb.cpp, https://godbolt.org/z/Mr6E3Ez48
- Listing 27.5: Outputting a Boolean as text or a number.
- Book: lst-0009-book.cpp
- Godbolt: lst-0009-godb.cpp, https://godbolt.org/z/s1csa51z9
- Listing 27.6: Number formats in output.
- Book: lst-0011-book.cpp
- Godbolt: lst-0011-godb.cpp, https://godbolt.org/z/bEKaYdssE
- Listing 27.7: Different ways to pad output.
- Book: lst-0012-book.cpp
- Godbolt: lst-0012-godb.cpp, https://godbolt.org/z/TMdzrjvhd
- Listing 27.8: Number formats in output.
- Book: lst-0013-book.cpp
- Godbolt: lst-0013-godb.cpp, https://godbolt.org/z/sYK8oT33x
- Listing 27.9: Custom manipulators.
- Book: lst-0014-book.cpp
- Godbolt: lst-0014-godb.cpp, https://godbolt.org/z/z8zc3ocd5
- Listing 27.10: Manipulator as lambda.
- Book: lst-0016-book.cpp
- Listing 27.11: Manipulators with parameters.
- Book: lst-0017-book.cpp
- Godbolt: lst-0017-godb.cpp, https://godbolt.org/z/KKE6nWT49
- Listing 27.12: Directly influencing format.
- Book: lst-0019-book.cpp
- Godbolt: lst-0019-godb.cpp, https://godbolt.org/z/csbPMYM19
- Listing 27.13: Influencing format with “setf” and “unsetf”.
- Book: lst-0020-book.cpp
- Godbolt: lst-0020-godb.cpp, https://godbolt.org/z/1xzzMdjdM
- Listing 27.14: Saving and restoring flags.
- Book: lst-0021-book.cpp
- Godbolt: lst-0021-godb.cpp, https://godbolt.org/z/4MY1Yznv9
- Listing 27.15: Opening and creating files.
- Book: lst-0022-book.cpp
- Godbolt: lst-0022-godb.cpp, https://godbolt.org/z/o7YP7or8s
- Listing 27.16: Additional flags when opening files.
- Book: lst-0023-book.cpp
- Godbolt: lst-0023-godb.cpp, https://godbolt.org/z/GoPddTWq6
- Listing 27.17: Explicitly closing a file stream.
- Book: lst-0024-book.cpp
- Godbolt: lst-0024-godb.cpp, https://godbolt.org/z/TMzdWhE51
- Listing 27.18: Reading and writing with files.
- Book: lst-0025-book.cpp
- Godbolt: lst-0025-godb.cpp, https://godbolt.org/z/3756v8rzK
- Listing 27.19: Byte-wise reading and writing.
- Book: lst-0026-book.cpp
- Godbolt: lst-0026-godb.cpp, https://godbolt.org/z/sjaGaq48v
- Listing 27.20: Copying a file byte by byte.
- Book: lst-0027-book.cpp
- Listing 27.21: Line-by-line reading and writing.
- Book: lst-0028-book.cpp
- Godbolt: lst-0028-godb.cpp, https://godbolt.org/z/hPaz3a3sE
- Listing 27.22: Block-wise reading and writing with “read” and “write”.
- Book: lst-0029-book.cpp
- Godbolt: lst-0029-godb.cpp, https://godbolt.org/z/P6MPabsKc
- Listing 27.23: Block-wise reading and writing with a helper class.
- Book: lst-0030-book.cpp
- Godbolt: lst-0030-godb.cpp, https://godbolt.org/z/b3W48s86z
- Listing 27.24: Synchronizing output between threads with “osyncstream”.
- Book: lst-0032-book.cpp
- Godbolt: lst-0032-godb.cpp, https://godbolt.org/z/GefKP5sj4
- Listing 27.25: Writing to a “stringstream”.
- Book: lst-0033-book.cpp
- Godbolt: lst-0033-godb.cpp, https://godbolt.org/z/TT13E3sz5
- Listing 27.26: Reading from a “stringstream”.
- Book: lst-0034-book.cpp
- Godbolt: lst-0034-godb.cpp, https://godbolt.org/z/1EMox3hW5
- Listing 27.27: Type conversion using “stringstream”.
- Book: lst-0035-book.cpp
- Godbolt: lst-0035-godb.cpp, https://godbolt.org/z/vcoEcYYcx
- Listing 27.28: The “to_string” function.
- Book: lst-0036-book.cpp
- Godbolt: lst-0036-godb.cpp, https://godbolt.org/z/z6sYqM48e
- Listing 27.29: Transferring data from the “rdbuf”.
- Book: lst-0039-book.cpp
- Godbolt: lst-0039-godb.cpp, https://godbolt.org/z/8hK9Y4vhd
- Listing 27.30: How to concatenate paths.
- Book: lst-0041-book.cpp
- Godbolt: lst-0041-godb.cpp, https://godbolt.org/z/jddKxj7fW
- GodboltId:hTj94enjK
- Book: lst-0042-book.cpp
- Godbolt: lst-0042-godb.cpp, https://godbolt.org/z/hTj94enjK
- Listing 27.31: A formatter can delegate parsing and formatting.
- Book: lst-0043-book.cpp
- Godbolt: lst-0043-godb.cpp, https://godbolt.org/z/sdWsnTonG
- Listing 27.32: A formatter can parse and output itself.
- Book: lst-0044-book.cpp
- Godbolt: lst-0044-godb.cpp, https://godbolt.org/z/WqjK31Gn6