C++: From Basics to Expert

Objects, memory and the modern standards - from your first program to templates, threads and RAII.

Taught by Noshad Alam 12 lessons 36 min Published 23 Nov 2026

C++ is the language people reach for when the machine has to be used properly. It runs the engines behind most games, the matching systems inside exchanges where a microsecond is money, the browsers you are reading this in, and large parts of the operating system underneath them. It is not the easiest language to learn, and it is close to the most useful one to know: it gives you direct control of memory and layout, and then gives you abstractions that cost nothing at runtime to hide that control again when you do not need it.

Overview

That phrase - zero-cost abstraction - is the whole design. A `std::vector` is as fast as the array you would have written by hand. A `std::unique_ptr` compiles down to the same pointer, with the `delete` you would have forgotten inserted for you. A template is resolved before the program runs. C++ asks you to understand what each abstraction turns into, and in exchange it does not charge you for using one.

This course is three phases. The first is the language as a procedural one: the build pipeline, types, control flow, functions and the two containers you will use before anything else. The second is where C++ becomes itself - the stack and the heap, pointers and references, classes and the four pillars of object orientation, the Standard Template Library, files and exceptions. The third is modern C++, from C++11 to C++23: move semantics, smart pointers, lambdas, templates and concepts, threads and futures, and the engineering practices - RAII, build systems, unit tests - that hold a real codebase together. Every lesson is free to read in full.

Introduction

This is not a first programming course, and C++ is not a good first language. You should have written programs in something - loops, conditions, functions, some idea of what a variable is - because the first phase explains how C++ does those things rather than what they are. Python or JavaScript is plenty. If you know C already you can move through phase one quickly, but do not skip it: brace initialization, `std::string` and references are all C++ answers to C problems, and they appear there.

You need a compiler and a terminal. GCC, Clang or MSVC, all three of which the first topic covers installing. An IDE is optional and this course uses the command line, because `g++ -std=c++20 -Wall -Wextra -g main.cpp -o main` is a sentence worth being able to read.

One warning, given early because it shapes how you should study. C++ will compile code that is wrong. It will happily build a program that uses an object after its lifetime ended, and that program may work perfectly until the day it does not. The compiler's warnings and the sanitisers are not optional extras here - from phase two, run with them on, every time.

What you will be able to do

  • Build and debug a C++ program from the command line, and name what each stage of the build did
  • Choose types deliberately, and initialize them in the way that cannot surprise you
  • Explain the stack and the heap, and say which one any given object is on
  • Use pointers and references correctly, and say why a reference is not a pointer
  • Design classes with correct construction, copying and destruction
  • Reach for the right STL container, and know what each one costs
  • Read and write files, and use exceptions where they belong
  • Apply move semantics and smart pointers so that no `delete` appears in your code
  • Write templates, constrain them with concepts, and read a template error without flinching
  • Run work on threads without data races, using mutexes, atomics and futures
  • Hold a project together with RAII, a CMake build and unit tests

What each level covers

3 levels · 12 lessons

  1. Phase 1 - Beginner Fundamentals

    Environment setup, syntax and procedural programming: the parts of C++ you can see before objects and memory arrive.

    4 lessons 11 min of reading

    Start with Introduction and Environment Setup →
  2. Phase 2 - Intermediate Concepts and the Core Engine

    Memory, objects and the standard library: the stack and the heap, pointers and references, classes, the STL, files and exceptions.

    4 lessons 12 min of reading

    Start with Pointers, References and Memory Management →
  3. Phase 3 - Advanced C++ and Modern Paradigms

    C++11 through C++23: type inference, move semantics, smart pointers, templates and concepts, threads, and the practices that hold a codebase together.

    4 lessons 13 min of reading

    Start with Modern C++ - auto, Move Semantics, Smart Pointers and Lambdas →

Guides and articles

Longer reading about this subject, written alongside the course.

Course guide How to work through this course What each phase is for, the four things to build alongside it, the compiler flags that turn C++ from dangerous into merely strict, and what to skip on a first pass 4 min read

Before you start

  • A C++ compiler - GCC 11+, Clang 14+ or MSVC 2022
  • A terminal
  • A text editor or IDE
  • CMake, from phase three
  • Experience programming in some language

Common questions

What does the C++: From Basics to Expert course cover?
It is 3 levels and 12 lessons: Phase 1 - Beginner Fundamentals; Phase 2 - Intermediate Concepts and the Core Engine; Phase 3 - Advanced C++ and Modern Paradigms. Each level ends with a quiz, and the last one is an exam over the whole course.
How long does it take?
About 36 minutes of reading and exercises - roughly 0.6 hours. It is self-paced with no cohort and no start date, so you can leave and come back and the site remembers where you were.
What do I need to know first?
A C++ compiler - GCC 11+, Clang 14+ or MSVC 2022. A terminal. A text editor or IDE. CMake, from phase three. Experience programming in some language.
Is it free?
Yes. Every lesson, example and quiz in this course is free to read, and you do not need an account to read them. Signing in only adds progress tracking and quiz results.
What will I be able to do afterwards?
Build and debug a C++ program from the command line, and name what each stage of the build did. Choose types deliberately, and initialize them in the way that cannot surprise you. Explain the stack and the heap, and say which one any given object is on. Use pointers and references correctly, and say why a reference is not a pointer. Design classes with correct construction, copying and destruction. Reach for the right STL container, and know what each one costs. Read and write files, and use exceptions where they belong. Apply move semantics and smart pointers so that no `delete` appears in your code. Write templates, constrain them with concepts, and read a template error without flinching. Run work on threads without data races, using mutexes, atomics and futures. Hold a project together with RAII, a CMake build and unit tests.