C++ for Beginners
C++24 lessons4 hr 53 min
Learn C++ by building small programs, then use functions, classes, and the standard library to organize them.
Modules
Lessons open in reading order. Each one is a public page.
Starting out
6 lessonsCompile a first program, learn the syntax and types it uses, then make decisions, repeat work, and keep many values together.
Functions and library types
5 lessonsMove repeated work into functions, pass data by reference instead of copying it, and use vector, string, and algorithms from the standard library.
Classes and object lifetime
4 lessonsGroup state with the functions that act on it, keep objects valid from construction to destruction, and expose only what callers should change.
Inheritance, operators, and templates
5 lessonsDerive one type from another, make operators read like the built-in ones, and write templates that serve several types.
Exceptions, STL, and ownership
4 lessonsReport failures with exceptions, look values up in maps and sets, swap loops for standard algorithms, and let a smart pointer own heap memory while you read and write files.
