© Will Briggs 2019Will BriggsC++ for Lazy Programmershttps://doi.org/10.1007/978-1-4842-5187-4_14
14. Character Arrays and Dynamic Memory
Character arrays – a.k.a. “character strings,” or text – are important for many tasks. This chapter shows how to handle them, and how to create those or other arrays when you don’t know the size in advance.
We’ve been using char
arrays from the beginning. Our "Hello, world!"
quote from Chapters 1
is a character array, with contents as shown in Figure 14-1
The contents of the “Hello, world!” character array literal
'\0', the “null character,” ...