The Missing
C++17 Reference
Learning to program, in C++17, from nothing.
Start with Chapter 0 →Contents
Part 0 — Getting a compiler to obey
Part 1 — Writing programs
Productive from the first chapter, using the tools C++ actually gives you.
- 1Hello, World — and What Actually HappenedYou typed four lines in chapter 0 and a computer said hello back. Now find out what every single character in them was for — and print something of your own.Project: A fortune card
- 2Your First Error MessageYou are going to see thousands of these. Most people learn to read them by accident, slowly, over years. Here is the short version — the shape of a message, which one to read first, and the six you'll meet this week.Project: Fix the broken card
- 3Variables, and the Types They Insist OnChapter 1's program said the same thing every time. Here is how a program holds on to something — and why C++ makes you announce, up front, what kind of thing you are holding.Project: A receipt
- 4Strings: Text That Doesn't Fight BackIn most languages text is easy. In C++ it used to be famously awful, and then std::string arrived. Here is how to join it, measure it, cut pieces out of it, and find things inside it.Project: An initials formatter
- 5Input: Letting the Reader Talk Backcoming sooncin, getline, and why they disagree.
- 6Arithmetic, and Where It Betrays Youcoming soonInteger division, remainder, precedence, and floating point.
- 7Deciding Things: if, else, and Booleanscoming soonComparison, and, or, and nesting without knots.
- 8Loops: Doing It Again Until It's Donecoming soonwhile, for, break, and the infinite loop you'll write anyway.
- 9Functions: Giving Work a Namecoming soonParameters, return values, and why you'd bother.
- 10std::vector: A List That Growscoming soonpush_back, indexing, and range-for.
- 11Printing, Poking, and Proving It Workscoming soonFinding a bug by hand, then with a debugger.
- 12Copies, References, and Not Wasting Workcoming soonBy value, by const reference, and by reference.
- 13Sorting and Searching Without Writing Eithercoming soonsort, find, and accumulate.
- 14struct: Things That Belong Togethercoming soonGrouping fields into one type of your own.
- 15Files: Making Your Program Remembercoming soonifstream, ofstream, and reading line by line.
- 16Maps: Looking Things Up by Namecoming soonstd::map and structured bindings.
- 17Validation: Assuming the Worstcoming soonChecking input, at() vs [], and std::optional.
- 18Classes: Types You Design Yourselfcoming soonMember functions, and why data goes private.
- 19Constructors, and Types That Can't Be Brokencoming soonInitialization, invariants, const members.
- 20Splitting a Program Across Filescoming soonHeaders, include guards, a Makefile, and linker errors.
- 21Interlude: Build Something Realcoming soonNo new syntax. An expense tracker that remembers.
Part 2 — Lifting the floor
Back to the machinery the standard library was handling for you.
- 22What a Variable Really Iscoming soonMemory, addresses, sizeof, and the stack.
- 23Pointers, Finallycoming soonStars and ampersands, and why they were worth waiting for.
- 24What std::string Was Hidingcoming soonchar arrays and the null terminator you never saw.
- 25Raw Arrays, and Why vector Existscoming soonNo size, no bounds, and decay.
- 26The Heap: new, delete, and What Goes Wrongcoming soonManual memory, so you can read old code.
- 27Ownership: Destructors Doing the Workcoming soonRAII and unique_ptr.
- 28Templates: One Function, Any Typecoming soonThe angle brackets from chapter 10, explained at last.
- 29Iterators, and What range-for Becomescoming soonbegin, end, and lambdas properly.
- 30Borrowing Without Owningcoming soonReferences, pointers, string_view, and dangling.
- 31Undefined Behaviour: When C++ Stops Promisingcoming soonSanitizers, and reading a crash.
- 32Where to Go Nextcoming sooncppreference, newer C++, and reading other people's code.