Skip to main content

Interactive course

Course C++

Learn modern C++ from scratch to advanced level with 10 modules, 26 lessons, interactive memory/RAII labs, diagnostic quizzes, and verified exercises with Tree-sitter AST: from primitive types and pointers up to OOP, smart pointers, template, move semantics, STL ranges, exceptions, and concurrency.

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

01 · Fundamentals of C++

3 lessons

The foundations: variables, primitive data types, arithmetic-logical operators and input/output management 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.~12 min
  2. 1.2OperatorsArithmetic, relational, logical and assignment operators. Precedence and expressions.~10 min
  3. 1.3Input/Output and streamsThe standard library streams iostream: send output with std::cout and read input with std::cin.~12 min

02 · Flow Control

3 lessons

Conditional expressions for making decisions and iterative loops for repeating instructions.

  1. 2.1Conditional statements (if-else)Control conditional execution with if, else if, and else constructs.~12 min
  2. 2.2Iterative cyclesRepeat blocks of code with for loops, while, and do-while.~14 min
  3. 2.3Education switchManage multiple branchings in an orderly manner based on constant integer or char values.~10 min

03 · Functions and References

2 lessons

Break down the code into reusable blocks and understand how C++ passes data into memory.

  1. 3.1Basic functionsDeclare and define functions. Input parameters, return type and basic execution.~12 min
  2. 3.2Passage by value and referenceIn-memory copies vs aliases with the (&) reference operator. Change external parameters and use const T&.~14 min

04 · Object Oriented Programming

2 lessons

Introduce classes, encapsulation, and automatic resource management.

  1. 4.1Classes and ObjectsThe syntax class, data members and member functions. Access specifiers public and private for encapsulation.~14 min
  2. 4.2Builders and DestroyersInitialize object state upon creation and cleanup resources upon destruction.~14 min

05 · Data Structures and Pointers

2 lessons

Manage data collections and understand how physical memory works with pointers.

  1. 5.1Arrays and VectorsC-style static arrays, std::array and dynamic vectors std::vector. Adding, accessing and iterating.~14 min
  2. 5.2Pointers and Memory Stack/HeapMemory addresses (&), dereference (*), nullptr, dangling pointer and RAII.~18 min

06 · Inheritance and Polymorphism

2 lessons

Extend existing classes and implement polymorphic behavior via virtual functions and inheritance.

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

07 · Smart Pointers

2 lessons

Modern and secure dynamic memory management without leaks thanks to intelligent standard library pointers.

  1. 7.1std::unique_ptr and std::shared_ptrGuarantee exclusive ownership with unique_ptr + std::move or shared with reference counting via shared_ptr.~16 min
  2. 7.2std::weak_ptrResolve cyclic dependencies and observe resources managed by shared_ptr with lock() and expired().~14 min

08 · Templates

2 lessons

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

  1. 8.1Template functionsWrite generic functions parameterized with template <typename T> and understand type deduction.~14 min
  2. 8.2Template ClassesImplement containers and generic classes parameterized with respect to the content type and CTAD.~16 min

09 · Move Semantics, Lambda and STL Modern

4 lessons

Zero out useless copies with rvalue references (&&), express inline logic with lambda and compose pipeline STL / C++20 ranges.

  1. 9.1Move Semantics, Rvalue (&&) and std::moveLvalue vs rvalue, O(1) shift constructors/assignments, noexcept, and the 0/5 rule.~18 min
  2. 9.2Lambda Expressions and Capture ListsSyntax [captures](parameters) -> return, capture by value vs reference [&], mutable and generic lambda auto.~16 min
  3. 9.3Algorithms STL (<algorithm>, <numeric>) & C++20 Rangesstd::sort, std::find_if, std::accumulate and lazy views std::views::filter | transform without intermediate allocations.~16 min
  4. 9.4Zero-Copy Views: std::string_view and std::spanPass non-proprietary views on contiguous strings and buffers avoiding Heap copies and lifetime dangling.~15 min

10 · Modern Error Handling and Competition

4 lessons

Model absence and errors at the type level (optional, variant, exceptions RAII) and write multithreaded code without data races.

  1. 10.1Safe Types: std::optional and std::variantReplace magic sentinels and insecure unions with std::optional<T>, std::nullopt, std::variant and std::visit.~16 min
  2. 10.2Exceptions, Stack Unwinding & RAII Exception Safetythrow, try/catch for const&, std::exception hierarchy, noexcept and guaranteed release of resources in stack unwinding.~16 min
  3. 10.3Threads in C++: std::thread and std::jthread (C++20)Initiate concurrent executions, join/detach, safe argument passing, and RAII auto-join with std::jthread.~16 min
  4. 10.4Mutual Exclusion: std::mutex, scoped_lock and std::atomicPrevent data races and deadlocks by acquiring RAII locks with std::lock_guard / std::scoped_lock and lock-free atomic counters.~16 min
Related learning paths & tools

Tools & related tracks for Course C++

Explore structured learning tracks on eLearner.app, or jump straight into the live playground and printable cheatsheet for this course.

Frequently asked questions

Course C++ FAQ

How many lessons and hands-on exercises are in Course C++?

Course C++ covers 10 modules, 26 interactive lessons, and 130 practical exercises (~6 hours total) with instant automated validation.

Do I need local setup or IDE installation for Course C++?

No installation required: every exercise and the interactive Course C++ playground execute right in your browser via WASM and isolated sandboxes, with instant feedback.

Is Module 1 of Course C++ free without creating an account?

Yes. Module 1 (“Module 1 — Fundamentals of C++”), the live playground, and the printable cheatsheet are permanently free without signup, saving your progress locally in your browser.

Which companion courses pair best with Course C++?

Course C++ pairs smoothly with SQL, Linux, and Git courses on eLearner.app to round out database querying, CLI workflows, and version control.