C++ — Intermediate
Move from writing C++ to engineering it: memory and lifetime, object-oriented design, the STL, smart pointers, templates, and data structures — with practice at every step.
65 lessons0 challenges~28 hoursBeginner — no experience needed
Prerequisite course:C++ Beginner
Who this course is for
Learners who finished C++ — Beginner and want to design real C++ programs: classes with clean ownership, the STL used fluently, templates, and data structures built from scratch.
What you will be able to do
- Reason about memory: references, pointers, dynamic allocation, lifetime, and const correctness
- Design classes with proper constructors, destructors, and encapsulation
- Use inheritance, virtual functions, and polymorphism — and know when composition is better
- Overload operators and implement the Rule of Three/Five with copy and move semantics
- Choose and use STL containers and algorithms fluently, including with lambdas
- Apply modern C++: auto, constexpr, enum class, optional, variant, string_view
- Manage resources with unique_ptr/shared_ptr/weak_ptr under RAII
- Write and use function and class templates
- Handle errors with exceptions and exception-safe design; read and write files
- Implement core data structures (linked list, BST, hash table) and analyze complexity
- Build a substantial console application combining all of these skills
Memory, Pointers & Lifetime
References vs pointers, dynamic allocation, const correctness, and the lifetime model that separates working C++ from crashing C++.
- Intermediate Launchpad: the Model You Already Haveintermediate15 min read
- References: Second Names for Objectsintermediate20 min read
- Pointers: Addresses and the Null Contractintermediate20 min read
- Dynamic Memory: new, delete, and Leaksintermediate25 min read
- Const Correctness as Designintermediate20 min read
- Stack vs Heap: Choosing Where Objects Liveintermediate20 min read
- Checkpoint: Memory & Lifetimeintermediate30 min read
Object-Oriented Design
Classes as invariants: constructors, destructors, static members, this, and composition as the default structure.
- Classes as Invariantsintermediate20 min read
- Constructors and Member Initializationintermediate25 min read
- Destructors and Automatic Cleanupintermediate20 min read
- Static Members: Class-Level Stateintermediate20 min read
- The this Pointerintermediate15 min read
- Composition Over Inheritanceintermediate20 min read
- Checkpoint: Object-Oriented Designintermediate30 min read
Inheritance & Polymorphism
Public inheritance, virtual dispatch, abstract interfaces, and the virtual-destructor rule that keeps polymorphic cleanup safe.
- Inheritance: Modeling IS-Aintermediate25 min read
- Protected Members and Constructor Chainingintermediate20 min read
- Construction and Destruction Orderintermediate20 min read
- Overriding and the override Keywordintermediate20 min read
- Virtual Functions and Polymorphismintermediate30 min read
- Virtual Destructorsintermediate15 min read
- Checkpoint: Polymorphismintermediate35 min read
Operators, Copy & Move
Overloading with honest semantics, then the Rule of Three/Five: deep copies, self-assignment, moves, and moved-from states.
STL Fundamentals
The standard library's core containers: sequence complexity, adapters, ordered vs unordered lookup, and the checklist for choosing between them.
- Sequence Containers: The Complexity Decisionintermediate30 min read
- Container Adapters: stack, queue, priority_queueintermediate20 min read
- Associative Containers: Ordered vs Unorderedintermediate30 min read
- Choosing the Right Containerintermediate20 min read
- Checkpoint: STL in Combinationintermediate35 min read
Iterators and Algorithms
The algorithm vocabulary over begin/end: categories, find/count/sort, transform and accumulate, and lambda captures with correct lifetimes.
- Iterators: The Container-Algorithm Glueintermediate25 min read
- Core Algorithms: find, count, sort, and Friendsintermediate25 min read
- Transform and Accumulate: Map and Foldintermediate25 min read
- Lambda Functions and Capturesintermediate30 min read
- Checkpoint: One Transform, Whole Answerintermediate35 min read
Modern C++
The modern toolkit: auto and deduction, constexpr and enum class, optional and variant, and the idioms that make C++ code safe by default.
Smart Pointers and RAII
Ownership made explicit: RAII foundations, unique_ptr as default, shared/weak mechanics, and a decision table for picking the model.
Templates
Generic programming: function and class templates, deduction and contracts, full and partial specialization, and a workflow for designing your own.
Error Handling and File I/O
Failure as a first-class citizen: the standard exception family, custom types with data, safety guarantees, and line-oriented content processing.
Data Structures and Algorithms
The thinking layer: Big-O literacy, binary search, recursion and list surgery, BSTs and graph traversal.
Intermediate Final Project
The capstone: architecture, integration, and a finishing checklist — assemble the whole course into one working library manager.