C++ Programming for Beginners
Modern C++ (C++20): memory, classes, STL and performance basics.
Taught by Anisha Rai · Senior Software Engineer
What you'll learn
- Compile, run and debug C++20 programs from the terminal with g++ or clang++ and warnings enabled
- Explain the difference between stack and heap memory and use references and pointers safely
- Design classes that protect their invariants and release resources automatically through RAII
- Choose the right STL container and replace raw loops with algorithms, lambdas and ranges
- Express ownership with std::unique_ptr and std::shared_ptr and move large objects instead of copying them
- Structure a multi-file project with CMake and catch memory bugs with sanitizers
About this course
Learn modern C++ from the ground up and understand the language behind game engines, robotics, embedded systems and high-performance software. This beginner course is for students, self-taught programmers and developers coming from Python, Java or JavaScript who want to work closer to the machine. You will compile programs with g++ or clang++, write C++20 with safe types and functions, and build a clear mental model of the stack, the heap, references and pointers. You will then design classes with constructors and RAII, use STL containers, algorithms and ranges, manage ownership with smart pointers and move semantics, and organise a real project with CMake, sanitizers and basic performance measurement. You need basic programming familiarity, such as variables, loops and functions in any language; no prior C or C++ experience is required.
Course content
7 lessons- 1Why C++ and Your First Compiled ProgramWhere C++ is used today, how compilation works and how to build your first program with a modern compiler.Preview
- 2Types, Variables, Control Flow and FunctionsFundamental types, const and auto, brace initialisation, loops, decisions and reusable functions.
- 3References, Pointers and MemoryHow the stack and heap work, and when to use references, pointers and nullptr safely.
- 4Classes, Constructors and RAIIModel concepts with classes, protect invariants with constructors and manage resources automatically with RAII.
- 5The STL: Containers and AlgorithmsChoose the right standard container and replace hand-written loops with algorithms, lambdas and ranges.
- 6Smart Pointers, Ownership and Move SemanticsExpress who owns heap objects with unique_ptr and shared_ptr, and move data instead of copying it.
- 7Building Real Projects: CMake, Tooling and PerformanceSplit code into headers and sources, build with CMake, catch bugs with sanitizers and measure performance.