Skip to main content
eLearner.app

Interactive course

C++ Course

Learn modern C++ from scratch with guided exercises, static validation, and Compiler Explorer integration: from basic syntax and data types to classes and object-oriented programming.

Static verification via keywords + execution on Compiler Explorer (one click for copy code + open).

01 · C++ Fundamentals

3 lessons

The foundations: variables, primitive data types, arithmetic-logic operators, and basic input/output with std::cout and std::cin.

  1. 1.1Variables and data typesPrimitive types (int, double, char, bool) and complex objects (std::string). Declaration, initialization, and scoping.~10 min
  2. 1.2OperatorsArithmetic, relational, logical, and assignment operators. Precedence and expressions.~8 min
  3. 1.3Input/Output and streamsStandard streams from the iostream library: sending output with std::cout and reading input with std::cin.~10 min

02 · Control Flow

3 lessons

Conditional expressions to make decisions and loops to repeat instructions.

  1. 2.1Conditional statements (if-else)Control conditional execution with if, else if, and else constructs.~10 min
  2. 2.2LoopsRepeat blocks of code using for, while, and do-while loops.~12 min
  3. 2.3The switch statementManage multiple branching pathways cleanly based on integer or char constant values.~8 min

03 · Functions and References

2 lessons

Decompose code into reusable blocks and understand how C++ passes data in memory.

  1. 3.1Basic functionsDeclare and define functions. Input parameters, return types, and basic execution.~10 min
  2. 3.2Pass by value and referenceCopies in memory vs aliases with the reference operator (&). Modifying external parameters.~12 min

04 · Object-Oriented Programming

2 lessons

Introducing classes, encapsulation, and automatic resource management.

  1. 4.1Classes and ObjectsThe class syntax, data members, and member functions. Public and private access specifiers for encapsulation.~12 min
  2. 4.2Constructors and DestructorsInitialize object state at creation time and clean up resources upon destruction.~12 min

05 · Data Structures and Pointers

2 lessons

Manage collections of data and understand how physical memory works using pointers.

  1. 5.1Arrays and VectorsStatic C-style arrays and dynamic std::vector. Appending, accessing, and manipulating data collections.~12 min
  2. 5.2PointersMemory addresses, reference operator (&), and dereferencing (*). Using nullptr for safety.~15 min

06 · Inheritance and Polymorphism

2 lessons

Extend existing classes and implement polymorphic behaviors using virtual functions and inheritance.

  1. 6.1Inheritance in C++Create class hierarchies with public inheritance, understand the protected specifier, and invoke base class constructors.~12 min
  2. 6.2Polymorphism and virtual functionsResolve methods at runtime using the virtual keyword, understand virtual destructors, and pure abstract classes.~15 min

07 · Smart Pointers

2 lessons

Modern and safe dynamic memory management without leaks using standard library smart pointers.

  1. 7.1std::unique_ptr and std::shared_ptrEnsure exclusive ownership of a resource with unique_ptr or shared ownership with reference counting using shared_ptr.~12 min
  2. 7.2std::weak_ptrResolve cyclic dependencies and non-owning references associated with resources managed by shared_ptr.~12 min

08 · Templates

2 lessons

Introduce generic programming by writing reusable functions and classes independent of data types.

  1. 8.1Function TemplatesWrite generic functions by defining template type parameters and understand type deduction by the compiler.~12 min
  2. 8.2Class TemplatesImplement generic classes and data structures parameterized with respect to the contained data type.~15 min