listings-Chap06-README.md
Listings of Chap06.docx
This is linked summary of the listings. You can also view it on one page.
- Listing 06.1 Some possible uses of strings.
- Book: lst-0001-book.cpp
- Godbolt: lst-0001-godb.cpp, https://godbolt.org/z/cv1qfcEd4
- Listing 06.2 A string_view can be easily created from a string.
- Book: lst-0004-book.cpp
- Godbolt: lst-0004-godb.cpp, https://godbolt.org/z/1zfo7fPcs
- Listing 06.3 The error stream is separated from the standard output.
- Book: lst-0005-book.cpp
- Godbolt: lst-0005-godb.cpp, https://godbolt.org/z/P1fn5q8z8
- Listing 06.4 A function with inputs and outputs.
- Book: lst-0006-book.cpp
- Godbolt: lst-0006-godb.cpp, https://godbolt.org/z/xYvPxbjr5
- GodboltId:a6qqbWKMs
- Book: lst-0007-book.cpp
- Godbolt: lst-0007-godb.cpp, https://godbolt.org/z/a6qqbWKMs
- GodboltId:McqfcWb8j
- Book: lst-0008-book.cpp
- Godbolt: lst-0008-godb.cpp, https://godbolt.org/z/McqfcWb8j
- GodboltId:P9z8n8v16
- Book: lst-0009-book.cpp
- Godbolt: lst-0009-godb.cpp, https://godbolt.org/z/P9z8n8v16
- Listing 06.5 Use the ! operator to check the state of the stream.
- Book: lst-0010-book.cpp
- Godbolt: lst-0010-godb.cpp, https://godbolt.org/z/ssW3eKEGq
- Listing 06.6: Use stream manipulators from
to influence the format of the output. - Book: lst-0011-book.cpp
- Godbolt: lst-0011-godb.cpp, https://godbolt.org/z/EcnWz3r3j
- Listing 06.7: You store a fixed number of elements in an “array”.
- Book: lst-0015-book.cpp
- Godbolt: lst-0015-godb.cpp, https://godbolt.org/z/cd1d1W7T1
- Listing 06.8 The array size must be constant.
- Book: lst-0016-book.cpp
- Godbolt: lst-0016-godb.cpp, https://godbolt.org/z/zfe7dM4ex
- Listing 06.9 If you need to use an array definition more than once, use “using”.
- Book: lst-0017-book.cpp
- Godbolt: lst-0017-godb.cpp, https://godbolt.org/z/a4zxbd99z
- GodboltId:T9jsEoMj4
- Book: lst-0018-book.cpp
- Godbolt: lst-0018-godb.cpp, https://godbolt.org/z/T9jsEoMj4
- Listing 06.10: The simplest iteration uses a range based “for” loop.
- Book: lst-0019-book.cpp
- Godbolt: lst-0019-godb.cpp, https://godbolt.org/z/hhhavG5he
- Listing 06.11 Accessing the elements by index.
- Book: lst-0020-book.cpp
- Godbolt: lst-0020-godb.cpp, https://godbolt.org/z/xcKM7v1Eo
- Listing 06.12: The use of iterators for a loop.
- Book: lst-0021-book.cpp
- Godbolt: lst-0021-godb.cpp, https://godbolt.org/z/1WG8zvhYe
- Listing 06.13 Counting with an algorithm.
- Book: lst-0022-book.cpp
- Godbolt: lst-0022-godb.cpp, https://godbolt.org/z/4G67rso8T