C++ Programming

C++ Programming

C's performance and control plus classes, RAII, smart pointers, templates, and the Standard Template Library -- still foundational for games, finance, and high-performance systems.

intermediate12 lessons4 modules6h total

Helpful before you begin (optional -- you can start this course now): C Programming

Who it's for

Learners with some C or other programming experience who want to move into object-oriented, resource-safe C++.

What you'll be able to do

  • Read and predict the behavior of real C++ programs covering classes, constructors/destructors, and templates
  • Explain RAII and why smart pointers are preferred over raw new/delete in modern C++
  • Describe how inheritance and virtual functions enable polymorphism, and how the STL's containers/algorithms are used

Not started — 12 lessons, no account required.

Start this course

Practice this course →Add to a study plan →Interview questions

C++ Fundamentals

What C++ adds over C, references and auto, and function overloading.

  1. Introduction to C++: What It Adds Over C

    iostream vs stdio, std::string vs C strings, and why C++ exists alongside C.

    15 min
  2. Variables, References, and auto

    Declaring variables, C++'s reference type, and type inference with auto.

    18 min
  3. Control Flow and Function Overloading

    C++'s familiar control flow, plus function overloading -- something plain C doesn't allow.

    18 min

Classes & Objects

Constructors/destructors, encapsulation, and struct vs class.

  1. Classes, Constructors, and Destructors

    Defining a class, and the automatic construction/destruction lifecycle every object gets.

    20 min
  2. Encapsulation and Access Specifiers

    Controlling visibility of a class's members with public, private, and protected.

    18 min
  3. struct vs class

    The one real difference between C++'s struct and class -- and how to choose between them.

    16 min

Modern C++ & Memory

RAII, smart pointers, and references vs pointers.

  1. RAII: Resource Acquisition Is Initialization

    Why tying resource cleanup to a destructor makes cleanup automatic and impossible to forget.

    18 min
  2. Smart Pointers: unique_ptr and shared_ptr

    Applying RAII to heap memory, so you never write a raw delete yourself.

    20 min
  3. References vs Pointers, and When to Use Each

    Comparing C++'s two ways to indirectly access a variable, and choosing between them.

    18 min

Templates, STL & Inheritance

Generic programming with templates, the STL, and inheritance/polymorphism.

  1. Templates: Generic Programming

    Writing one function or class that works across multiple types, without duplicating code.

    20 min
  2. The STL: std::vector and <algorithm>

    C++'s resizable array type, and two everyday functions from the algorithms library.

    20 min
  3. Inheritance and Virtual Functions

    Deriving one class from another, and why the virtual keyword is what actually enables polymorphism.

    22 min