Learn C++ from zero
Seven short lessons, in order, each with runnable code and matching practice problems. Start at lesson 1 and you will be writing real programs by the end of the week.
1 Hello, world
Your first program, line by line: what #include, main and cout actually do.
2 Variables and input
int, double, char, bool — declare, print, read with cin, and the four beginner traps.
3 Making decisions
Comparisons, if/else chains, && and ||, and the = vs == trap.
4 Loops
for when you know the count, while when you don't, and the three loop bugs.
5 Arrays
Index from zero, fill and traverse with loops, and the running-maximum pattern.
6 Functions
Parameters, return values, and a first taste of recursion.
7 Pointers
Addresses, & and *, and the two rules that keep you out of trouble.
Articles that pair with these lessons
- Why 7 / 2 is 3 (integer division)
- cin vs getline (input traps)
- Pass by value, pointer or reference
- 10 compiler errors, decoded
Finished the course?
Head to the practice section — 59 problems ordered from first steps to real algorithms — or read the modern C++ roadmap to see what comes after the teaching core.