Skip to content

C++ From Zero (Absolute Beginner to Modern C++)

Learn C++ from the very first line of code to modern, idiomatic C++17/20 — the systems language that the shared core (data structures, computer architecture, performance) and the AI-chip branch are a…

Learn C++ from the very first line of code to modern, idiomatic C++17/20 — the systems language that the shared core (data structures, computer architecture, performance) and the AI-chip branch are all written in. You build understanding of the machine as you go: types and the compiler, control flow and functions, the memory model (pointers, references, the stack and heap), RAII and ownership with smart pointers, the STL and templates, and modern features like move semantics and lambdas. This is Tier 0 of the Zero-to-Low-Level-Systems-Elite program: it turns the mathematical 'what' from math-foundations into the 'how' that runs on real hardware.

6 phases · 48 projects · v1.1.0 · 48 video lessons

Target roles: C++ Developer, Low-Latency / HFT Engineer (foundation), AI-Chip / Kernel Engineer (foundation), Systems / Robotics Engineer (foundation)

Stack: C++17/20, g++/clang++, CMake, GoogleTest

Watch the video series for this track

PHASE 1 · 8 projects

Setup, First Programs, Types & I/O

Compile and run C++ from zero: the toolchain, types, variables, expressions, and console I/O.

  1. 01 · featured

    Hello World & the Toolchain

    Install a C++ compiler, write/compile/run a minimal program, and understand the compile-link-execute pipeline and how it differs from interpreted languages — building toolchain literacy, not just a hello world.

    C++17/20 · g++/clang++

  2. 02 · featured

    Variables & Fundamental Types

    Declare C++'s fundamental types (int, double, char, bool), measure their byte sizes with sizeof, explore ranges with <limits>, and use auto deduction — grounding static typing in the powers-of-two and overflow reasoning from math-foundations.

    C++17/20 · g++/clang++

  3. 03 · featured

    Console Input & Output

    Make programs interactive with std::cin and std::cout: read typed values and whole lines, format floating-point output, and detect failed reads — the input/process/output skeleton of every CLI tool.

    C++17/20 · g++/clang++

  4. 04 · featured

    Operators & Expressions

    Master arithmetic, comparison, and logical operators and the type rules that govern them — the integer-division trap, modulo, type promotion with static_cast, precedence, and compound assignment.

    C++17/20 · g++/clang++

  5. 05 · featured

    Strings & Characters

    Work with text using std::string — concatenate, index, search with find, slice with substr — contrast it with error-prone C-style char arrays, and build small text tools (uppercase, vowel count, key=value split).

    C++17/20 · g++/clang++

  6. 06 · featured

    Constants & Type Conversions

    Use const and constexpr for immutability and compile-time constants, convert between types safely with static_cast (recognizing narrowing/data loss), and convert numbers to/from strings — instilling const-correctness.

    C++17/20 · g++/clang++

  7. 07 · featured

    Integer Types & Overflow

    Use fixed-width integer types from <cstdint>, compare signed/unsigned ranges, reproduce and explain overflow (unsigned wrap as modular arithmetic; signed overflow as undefined behavior), and choose integer types deliberately by range and size.

    C++17/20 · g++/clang++ · cstdint

  8. 08 · featured

    Interactive Unit Converter (Phase Finale)

    Combine types, I/O, expressions, constants, and validation into a robust menu-driven unit converter that loops until quit and recovers cleanly from bad input — the read/validate/process/print skeleton that scales up to the track capstone.

    C++17/20 · g++/clang++

PHASE 2 · 8 projects

Control Flow & Functions

Direct program flow and structure code: conditionals, loops, functions, parameters, overloading, and scope.

  1. 01 · featured

    Conditionals — if / else

    Branch program flow with if/else if/else and the ternary operator, build compound conditions with && and ||, order conditions correctly in a grade classifier, and avoid the =/== and dangling-else traps.

    C++17/20 · g++/clang++

  2. 02

    Switch Statements

    Branch on discrete values with switch/case, use break and understand intentional vs accidental fall-through, group cases, provide a default, and decide when switch beats an if/else chain.

    C++17/20 · g++/clang++

  3. 03 · featured

    Loops — while, for & do-while

    Repeat work with while, for, and do-while loops, control them with break and continue, use range-based for over a collection, and avoid infinite-loop and off-by-one traps — connecting iteration count to Big-O.

    C++17/20 · g++/clang++

  4. 04 · featured

    Functions — Parameters & Return

    Define and call functions with typed parameters and return values, understand pass-by-value (copies), write void action functions, use declarations vs definitions, and decompose a problem into small single-purpose functions.

    C++17/20 · g++/clang++

  5. 05

    Function Overloading & Default Arguments

    Overload functions by parameter type and arity, understand compile-time overload resolution, provide trailing default arguments, and recognize/fix ambiguous calls.

    C++17/20 · g++/clang++

  6. 06

    Scope & Lifetime

    Distinguish scope (visibility) from lifetime (existence): block scope, variable shadowing, static locals that persist across calls, automatic vs static storage, and the dangers of mutable global state — groundwork for pointers and RAII.

    C++17/20 · g++/clang++

  7. 07 · featured

    Recursion

    Write recursive functions (factorial, Fibonacci, sum-of-digits, power) with base and recursive cases, trace the call stack, compare to iteration, hit and explain stack overflow, and connect to induction/recurrences and memoization from math-foundations.

    C++17/20 · g++/clang++

  8. 08 · featured

    Menu-Driven Calculator (Phase Finale)

    Combine functions, conditionals, loops, and switch into a cleanly decomposed interactive calculator: pure operation functions, a validated input helper, a switch dispatcher, std::optional for division-by-zero, and a thin main — the structure that makes the track capstone testable.

    C++17/20 · g++/clang++ · optional

PHASE 3 · 8 projects

The Memory Model — Pointers, References & the Stack/Heap

Understand how C++ actually stores data: arrays, pointers, references, the stack vs the heap, and manual allocation.

  1. 01 · featured

    Arrays

    Store many values in contiguous memory with fixed-size arrays, iterate with indexed and range-based loops, observe the contiguous layout via element addresses, and confront the limitations (no bounds check, no size knowledge) that motivate std::vector.

    C++17/20 · g++/clang++

  2. 02 · featured

    Pointers — Introduction

    Understand pointers as variables holding memory addresses: use address-of (&) and dereference (*), read and modify a value through a pointer (indirection), and use nullptr with guarded dereferences.

    C++17/20 · g++/clang++

  3. 03 · featured

    References

    Use references as aliases for existing variables, pass by reference to modify caller data (a working swap), pass large objects by const& for efficiency and safety, and learn when to choose a reference vs a pointer.

    C++17/20 · g++/clang++

  4. 04 · featured

    Pointer Arithmetic & Arrays

    Discover the pointer-array connection: array-name decay, pointer arithmetic that scales by element size, the equivalence arr[i] == *(arr+i), and the half-open begin/end traversal idiom that STL iterators generalize.

    C++17/20 · g++/clang++

  5. 05 · featured

    The Stack & the Heap

    Learn the two memory regions — the automatic stack and the manual heap — allocate with new/new[] and free with delete/delete[], allocate runtime-sized arrays, and understand the speed/size/lifetime tradeoffs that motivate RAII.

    C++17/20 · g++/clang++

  6. 06 · featured

    Dynamic Memory — Leaks & Dangling Pointers

    Deliberately create and then fix the classic manual-memory bugs — leaks, dangling pointers (use-after-free), and double-frees — detect them with AddressSanitizer, and understand why these failures motivate RAII and smart pointers.

    C++17/20 · g++/clang++ · AddressSanitizer

  7. 07 · featured

    Pointers & References as Function Parameters

    Master the three ways to pass data — by value, by reference, by pointer — with correct const usage, output parameters, and a practical decision rule for which to use based on size, mutability, and nullability.

    C++17/20 · g++/clang++

  8. 08 · featured

    Dynamic Array (Phase Finale)

    Build a growable integer array by hand with new[]/delete[] — your own mini std::vector — tracking size vs capacity, doubling on growth (amortized O(1), per the geometric series), and freeing in a destructor (first RAII), then reflect on the manual bookkeeping smart pointers automate.

    C++17/20 · g++/clang++ · AddressSanitizer

PHASE 4 · 8 projects

RAII, Ownership & Smart Pointers

Manage resources the modern C++ way: classes, constructors/destructors, RAII, and unique/shared/weak pointers.

  1. 01 · featured

    Classes & Objects

    Define your own types with classes — bundling member data and methods, controlling access with public/private, marking read-only methods const, and enforcing class invariants through encapsulation.

    C++17/20 · g++/clang++

  2. 02 · featured

    Constructors & Destructors

    Control object birth and death: constructors that initialize state via member initializer lists, destructors that clean up, constructor overloading, and the automatic construct-on-entry/destruct-on-exit (reverse order) lifecycle that RAII is built on.

    C++17/20 · g++/clang++

  3. 03 · featured

    RAII — Resource Acquisition Is Initialization

    Learn the defining C++ idiom: tie a resource's lifetime to an object's, acquiring in the constructor and releasing in the destructor so cleanup is automatic and guaranteed — even on early returns and exceptions — then refactor leaky manual-memory code into a leak-proof RAII wrapper.

    C++17/20 · g++/clang++ · AddressSanitizer

  4. 04 · featured

    The Rule of Three

    Fix the copy bug in resource-owning classes: reproduce the double-free from default shallow copy, implement a deep-copying copy constructor and a self-assignment-safe copy assignment operator, state the Rule of Three, and learn = delete and the Rule of Zero.

    C++17/20 · g++/clang++ · AddressSanitizer

  5. 05 · featured

    std::unique_ptr

    Use std::unique_ptr and make_unique to own heap objects with automatic cleanup (RAII for any allocation), understand exclusive ownership (no copy, only move via std::move), borrow with .get(), and make ownership explicit in function signatures.

    C++17/20 · g++/clang++ · memory · AddressSanitizer

  6. 06 · featured

    std::shared_ptr

    Share ownership of a heap object with std::shared_ptr and make_shared, watch reference counting via use_count() determine when the object is freed, decide shared vs unique ownership, and observe the reference-cycle leak that motivates weak_ptr.

    C++17/20 · g++/clang++ · memory · AddressSanitizer

  7. 07 · featured

    std::weak_ptr & Breaking Cycles

    Use std::weak_ptr as a non-owning observer of a shared_ptr's object: access safely via lock(), detect expiration, and break the reference-cycle leak by making the back-reference weak — completing the smart-pointer ownership toolkit.

    C++17/20 · g++/clang++ · memory · AddressSanitizer

  8. 08 · featured

    RAII Resource Manager (Phase Finale)

    Build a complete, leak-proof resource-owning class (a FileLogger and a smart-pointer-owning TaskPool) using the Rule of Zero — composing from RAII members so cleanup is automatic and exception-safe — and verify correctness under AddressSanitizer.

    C++17/20 · g++/clang++ · fstream · memory · AddressSanitizer

PHASE 5 · 8 projects

The STL & Templates

Use the Standard Template Library and write generic code: vector, map, set, iterators, algorithms, and templates.

  1. 01 · featured

    std::vector

    Use std::vector — the production-grade version of your Phase 3 dynamic array: create/grow/access, iterate three ways, observe capacity doubling (amortized O(1) push_back), and use reserve to avoid reallocations.

    C++17/20 · g++/clang++ · vector

  2. 02

    std::string & string_view

    Learn std::string properly (build/concatenate/search/slice, string↔number conversion) and meet std::string_view — a non-owning (pointer, length) view that passes and slices text with zero copying, plus when a view dangles.

    C++17/20 · g++/clang++ · string · string_view

  3. 03

    std::map & unordered_map

    Use associative containers: build map<string,int>, insert/update/look up by key, query safely with contains/find/at (and avoid the [] auto-insert trap), iterate with structured bindings, build a word-frequency counter, and choose between sorted std::map (O(log n)) and hash-based std::unordered_map (avg O(1)).

    C++17/20 · g++/clang++ · map · unordered_map

  4. 04

    std::set, pair & tuple

    Use std::set for unique, sorted membership and deduplication (O(log n) contains/count), and std::pair/std::tuple to bundle values — accessing .first/.second and std::get<N>, unpacking with structured bindings, and returning multiple values from a function.

    C++17/20 · g++/clang++ · set · tuple · utility

  5. 05

    Iterators

    Learn iterators — the generalized-pointer abstraction every container shares: begin()/end() half-open ranges, *it / ++it / it->, const_iterator, find/erase by iterator (checking against end()), iterator invalidation (it = erase(it)), and how range-based for is iterators underneath.

    C++17/20 · g++/clang++ · iterator · algorithm

  6. 06 · featured

    STL Algorithms

    Replace raw loops with named STL algorithms over iterator ranges: sort (with comparator lambdas), find/count/count_if/any_of, max_element/accumulate (reduce), transform/copy_if (map/filter), and the remove_if+erase idiom — passing custom logic via lambdas.

    C++17/20 · g++/clang++ · algorithm · numeric

  7. 07

    Function Templates

    Write your own generic functions with template <typename T>: argument deduction vs explicit arguments, multiple type parameters, compile-time instantiation (and why template errors are confusing), and constraining a template with a C++20 concept for clear diagnostics.

    C++17/20 · g++/clang++ · templates · concepts

  8. 08 · featured

    Class Templates — Build Your Own Stack<T>

    Phase finale: write a class template Stack<T> backed by a std::vector<T> member — a generic, RAII-clean LIFO container (push/pop/top/empty/size) that works for any element type, nests (Stack<Stack<int>>), and solves a real problem (balanced brackets). Synthesizes templates + vector + RAII + clean design, the way real STL adaptors are built.

    C++17/20 · g++/clang++ · class templates · vector · RAII

PHASE 6 · 8 projects

Modern C++ (Move Semantics, Lambdas, C++17/20)

Write idiomatic modern C++: move semantics, lambdas, auto, optional/variant, ranges, and concurrency basics.

  1. 01 · featured

    Move Semantics & Rvalue References

    Learn the performance feature at the heart of modern C++: lvalues vs rvalues, what std::move really is (a cast, not a mover), and how a move steals a resource (O(1) pointer swap) instead of deep-copying. Build a Noisy class to watch COPY vs move, move-construct a std::string, and return a million-element vector by value for free.

    C++17/20 · g++/clang++ · move semantics · rvalue references · std::move

  2. 02 · featured

    The Rule of Five — Make Your Class Move

    Upgrade a raw-resource-owning class (Buffer with int* data_) from Phase 4's Rule of Three to the modern Rule of Five by adding a noexcept move constructor and move assignment that steal the pointer and null the source. Watch a move transfer ownership with no allocation, guard self-assignment, then learn the Rule of Zero: a std::vector member generates all five correctly for free.

    C++17/20 · g++/clang++ · Rule of Five · move semantics · RAII

  3. 03 · featured

    auto, decltype & Structured Bindings

    Let the compiler spell out types it already knows: use auto to deduce variable types (and know when it strips const/references vs const auto& which keeps them), and use C++17 structured bindings to unpack pairs, tuples, and structs into named variables. Master the modern map-iteration idiom for (const auto& [key, value] : map).

    C++17/20 · g++/clang++ · auto · structured bindings · decltype

  4. 04 · featured

    Lambdas, Closures & std::function

    Write anonymous functions inline with [capture](params){body}, capture surrounding variables by value [=] or reference [&] (a closure), and feed lambdas to STL algorithms (sort comparator, find_if/count_if predicates, for_each). Use mutable for stateful closures and std::function to store heterogeneous callables behind one signature, knowing its overhead.

    C++17/20 · g++/clang++ · lambdas · std::function · algorithms

  5. 05 · featured

    Vocabulary Types — std::optional & std::variant

    Model absence and alternatives with the type system. Use std::optional<T> for 'a value or nothing' (nullopt, has_value, value_or, checked value() vs unchecked *) instead of -1/null sentinels, and std::variant<Ts...> as a type-safe union (holds_alternative, get, index) dispatched with std::visit and a generic lambda + if constexpr.

    C++17/20 · g++/clang++ · std::optional · std::variant · std::visit

  6. 06 · featured

    Ranges & Views (C++20)

    Replace nested iterator-pair algorithms with readable left-to-right pipelines using the | operator and lazy, non-owning views: views::filter, views::transform, views::take, plus iota/drop/reverse. Prove laziness (computation happens on iteration, take(3) short-circuits), understand that views don't own data (dangling risk), and materialize a view into a vector when you need ownership.

    C++20 · g++/clang++ · ranges · views · lazy evaluation

  7. 07 · featured

    Concurrency Basics — Threads, Mutexes & std::async

    A safe introduction to parallelism: launch and join a std::thread, deliberately create a data race (lost increments from unsynchronized ++counter) and understand why it's undefined behavior, fix it with std::mutex + std::lock_guard (RAII locking), and use std::async + std::future to return a value from parallel work via get(). Closes with the discipline rules of correct concurrent code.

    C++17/20 · g++/clang++ · std::thread · std::mutex · std::async

  8. 08 · featured

    Track Capstone — A Tested, CMake-Packaged C++ CLI Tool

    The C++ From Zero finale: build expense-analyzer, a real CLI tool that parses an expenses CSV and reports total, per-category breakdown, and largest expense. Structure it as a testable library + thin main, build it out-of-source with CMake, and cover it with a GoogleTest suite (happy path + edge cases: malformed amount, negative amount, empty input). Synthesizes RAII, STL, std::optional, lambdas, moves, and structured bindings into one portfolio-grade, leak-free project.

    C++17/20 · CMake · GoogleTest · RAII · STL

Next step

Request C++ From Zero (Absolute Beginner to Modern C++)

An advisor reviews the fit and confirms terms in writing. A request is not an acceptance and nothing is charged until you agree.