Contents

Chapter 24

What std::string Was Hiding

char arrays and the zero byte you never saw.

Part 2

This chapter needs a key

A std::string is 24 bytes whether it holds one letter or a thousand. This chapter explains how that can possibly be true, and what text looked like before anyone made it comfortable.

You'll build: Walk a string by hand. Print text one character at a time, then overwrite the terminator and watch it grow.

Part 1, chapters 0 to 21, is free and always will be.