O'Reilly logo

C++17 Standard Library Quick Reference: A Pocket Guide to Data Structures, Algorithms, and Functions by Marc Gregoire, Peter Van Weert

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Peter Van Weert and Marc Gregoire 2019
Peter Van Weert and Marc GregoireC++17 Standard Library Quick Referencehttps://doi.org/10.1007/978-1-4842-4923-9_6

6. Characters and Strings

Peter Van Weert1  and Marc Gregoire2
(1)
Kessel-Lo, Belgium
(2)
Meldert, Belgium
 

Strings <string>

C++ supports C-style strings—plain C-style character arrays terminated with a null character ('\0', with ASCII code zero). The C Standard Library offers various headers with functions to manipulate such strings. Working directly with C-style strings, however, has serious drawbacks. Analogous to working with plain arrays (compared to working with, say, std::vector), a C-style string doesn’t know its own size, and it is your job to allocate the required memory. It also falls to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required