C++
Games, systems and high performance
Learn to write C++ programs from scratch: from your first “Hello, world!” to variables, conditions, loops and functions, and on to pointers, classes, the STL and modern C++17 features. Every example shows the exact output the program prints. By the end you will have a solid foundation for games, fast algorithms and programming olympiads.
Course content
C++ basics
BeginnerCompile your first program and learn about variables, types, operators, conditions and loops.
- 1What is C++? Your first programFind out where C++ is used and what compiling means, then write your first program with `std::cout`.12 min
- 2Variables, types and operatorsDeclare variables, work with `int`, `double`, `char`, `bool`, `std::string` and `auto`, and learn arithmetic operators and input with `std::cin`.16 min
- 3Conditions and loopsTeach your program to make decisions and repeat work: `if`, `switch`, comparison and logical operators, `for`, `while`, `break` and `continue`.18 min
Functions, containers and memory
IntermediateSplit code into functions, store data in arrays, vectors and strings, and understand how pointers and memory work.
- 4FunctionsWrite your own functions: return values, parameters, prototypes, overloading, default arguments, and passing by value or by reference.18 min
- 5Arrays, vectors and stringsKeep many values under one name: fixed-size arrays, the growable `std::vector` and `std::string` for working with text.18 min
- 6Pointers, references and memoryLearn about memory addresses, the `&` and `*` operators, `nullptr`, dynamic memory (`new`/`delete`) and `std::unique_ptr`, which manages it safely.20 min
Object-oriented C++
IntermediateCreate your own classes and use inheritance and virtual functions to achieve polymorphism.
- 7Classes and objectsCreate your own types: class members, methods, constructors and destructors, and encapsulation with `public` and `private`.20 min
- 8Inheritance and polymorphismDerive new classes from existing ones, build polymorphism with `virtual` functions and `override`, and use abstract classes.20 min
The STL and modern C++
AdvancedWrite short, reliable code with the standard library's containers and algorithms, lambdas and C++17/20 features.
- 9The STL: containers and algorithmsWork with the Standard Template Library: `std::map`, `std::set`, iterators and ready-made algorithms such as `std::sort`, `std::find` and `std::count`.20 min
- 10Modern C++: lambdas, structured bindings and constexprWrite short, reliable code with features from C++11 to C++20: lambda expressions, structured bindings, `const` and `constexpr`.20 min