C++ Essentials
Learn modern C++ from absolute zero: your first program, variables, control flow, functions, vectors and strings, pointers and smart pointers, classes, inheritance, and the STL — the language behind the world's fastest software.
Why learn C++ Essentials?
C++ is the language behind the world's fastest software: game engines, trading systems, browsers, operating systems, and embedded devices. Learning it teaches you what memory actually is and what your code really costs, knowledge that makes you better in every other language too.
This course teaches modern C++ from absolute zero. You start with your first program and work through variables, control flow, functions, vectors and strings, then the topics people fear from a distance: pointers, references, and memory, taught with smart pointers and modern practice rather than 1990s folklore.
The final modules cover classes, inheritance, polymorphism, and the STL, so you finish reading and writing the C++ that current codebases actually contain.
Who this course is for
- Beginners who want a rigorous first language and a deep mental model
- University students taking C++ or systems programming courses
- Developers curious about game engines, embedded, or performance work
What you'll build and practice
- Complete programs using modern C++ syntax and iostream
- Functions and classes with proper ownership of their data
- Pointer and reference code you can explain, not just pattern-match
- Your own types with constructors, inheritance, and polymorphism
- STL-based solutions using vectors, strings, maps, and algorithms
What you'll learn
C++ Essentials is organized into 10 focused modules. By the end you'll be comfortable with:
- Getting Started
- Variables & Types
- Making Decisions
- Loops
- Functions
- Collections: Arrays, Vectors & Strings
- Memory, Pointers & References
- Classes & Objects
- Inheritance & Polymorphism
- Templates & the Standard Library
Course curriculum
55 lessons across 10 modules. Lessons marked Free preview are readable without an account.
Module 1. Getting Started
What programs are, what C++ is, and your first working program
- 5mHow Computers Run ProgramsFree preview
What a program actually is, why programming languages exist, and what a compiler does — no code required yet.
- 6mWhat is C++?Free preview
Why C++ exists, what it powers, and your first look at a complete C++ program.
- 8mYour First C++ ProgramFree preview
Walk through Hello World line by line: #include, main(), cout, and semicolons.
- 8mComments, Escape Sequences & Compiler Errors
Write notes in your code, print special characters, and learn to read your first compiler errors.
Module 2. Variables & Types
Storing numbers and text, doing math, and reading input from the keyboard
- 8mWhat is a Variable?
Give your program a memory: named boxes that store values you can read and change.
- 10mDoing Math: Arithmetic Operators
Add, subtract, multiply, divide — plus integer division, the remainder operator, and shortcuts like += and ++.
- 10mFundamental Types
int, double, char, bool — choosing the right kind of box for each piece of data.
- 8mText: the string Type
Store words and sentences with std::string — joining, measuring, and peeking at characters.
- 8mReading Input with cin
Make programs interactive: read numbers and words from the keyboard with cin, and whole lines with getline.
- 8mConstants & auto
Lock values with const and constexpr, and let the compiler deduce types with auto.
- 10mType Conversions
What happens when int meets double: safe conversions, silent truncation, static_cast, and integer limits.
Module 3. Making Decisions
Comparisons, if/else, logical operators, the ternary operator, and switch
- 8mComparing Values
The six comparison operators, the bool answers they produce, and the == vs = trap.
- 10mif / else if / else
Run code only when a condition is true — and chain alternatives with else if and else.
- 8mLogical Operators: && || !
Combine conditions with AND, OR, and NOT — and dodge the 'between two values' trap.
- 6mThe Ternary Operator
A compact if/else for choosing between two values: condition ? a : b.
- 8mswitch Statements
Cleaner branching on fixed values with switch/case — and the fall-through rule.
Module 4. Loops
Repeating work with while, for, do-while, nested loops, and range-based for
- 8mwhile Loops
Repeat code while a condition holds — and learn why loops must move toward their exit.
- 10mfor Loops
The counted loop: initializer, condition, and update in one tidy header.
- 6mdo-while Loops
The run-first, ask-later loop — perfect for input validation.
- 8mbreak & continue
Exit a loop early with break, or skip one iteration with continue.
- 8mNested Loops
Loops inside loops: grids, tables, and patterns — and how the iteration counts multiply.
- 8mRange-based for Loops
Loop over every character of a string — no counters, no indexes, no off-by-one errors.
Module 5. Functions
Reusable routines: parameters, return values, scope, and overloading
- 8mWriting Functions
Name a block of code once, run it anywhere — defining and calling your first functions.
- 8mFunction Parameters
Pass information into functions — parameters, arguments, and why order matters.
- 8mReturn Values
Functions that compute and hand back answers — return types, early returns, and composing results.
- 10mScope & Pass-by-Value
Where variables live and die — and why functions receive copies of your arguments.
- 10mOverloading & Default Parameters
One name, several versions — and parameters that fill themselves in.
- 10mOrganizing Programs with Functions
Declarations vs definitions, and decomposing a real program into small, single-job functions.
Module 6. Collections: Arrays, Vectors & Strings
Storing many values: arrays, the vector workhorse, and serious text processing
- 8mArrays
Fixed-size collections: declaring arrays, zero-based indexing, and the out-of-bounds danger.
- 10mstd::vector
The growable array: push_back, size, safe access with .at(), and range-based loops.
- 10mVector Patterns: Sum, Max, Search, Sort
The four algorithms you'll write a thousand times — plus sort() from the standard library.
- 10mstd::string Methods
The string toolbox: substr, find, npos, and in-place modification.
- 10mText Processing in Practice
Combine loops, chars, and string-building: counting, transforming, and reversing text.
- 10mCollections Recap & Practice
Consolidate the module: vectors of strings, combined patterns, and a gradebook walkthrough.
Module 7. Memory, Pointers & References
How memory really works: addresses, references, pointers, the heap, and smart pointers
- 8mMemory & Addresses
The mental model behind everything: memory as numbered boxes, and the address-of operator &.
- 10mReferences
A second name for the same variable — and the key to functions that modify their arguments.
- 12mPointers
A variable that holds an address: declaring pointers, dereferencing with *, and re-aiming them.
- 8mPointer Safety: nullptr & Dangling Pointers
The three pointer accidents — null, uninitialized, and dangling — and the habits that prevent them.
- 10mDynamic Memory: Stack, Heap, new & delete
Two kinds of memory, manual allocation with new, cleanup with delete — and the memory leak.
- 10mSmart Pointers: unique_ptr
Modern C++ memory management: unique_ptr deletes for you — leaks become impossible by design.
Module 8. Classes & Objects
Design your own types: structs, classes, encapsulation, constructors, and RAII
- 8mGrouping Data: struct
Bundle related values into one type of your own — members, dot access, and structs in vectors.
- 10mDefining Classes
Data plus behavior: member functions, the class keyword, and your first objects.
- 10mEncapsulation: private & public
Protect your data with private members and a public interface that enforces the rules.
- 10mConstructors
Guarantee every object is born valid — constructor syntax, member initializer lists, and defaults.
- 10mDestructors & RAII
The goodbye method: automatic cleanup at scope end, and the pattern that powers all of modern C++.
- 12mClasses in Practice: Build a Type
Assemble the whole module into one well-designed class — and learn the design checklist.
Module 9. Inheritance & Polymorphism
Families of types: inheritance, virtual functions, polymorphism, and abstract classes
- 10mInheritance Basics
Build new classes on top of existing ones — base and derived classes, and the is-a test.
- 10mOverriding & virtual
Let derived classes replace base behavior — and why virtual is the keyword that makes it real.
- 10mPolymorphism
One interface, many behaviors: heterogeneous collections and code that never needs to know the concrete type.
- 10mAbstract Classes & Pure Virtual Functions
Base classes as pure contracts: = 0 methods, uninstantiable bases, and interface design.
Module 10. Templates & the Standard Library
Generic code and the STL: function templates, class templates, maps, and algorithms
- 10mFunction Templates
Write a function once, use it for every type — template<typename T> and type deduction.
- 10mClass Templates
Types parameterized by types — build your own Box<T>, and finally read vector<int> fluently.
- 10mmap & set
Key-value lookup and uniqueness — the two containers that replace a hundred search loops.
- 10mSTL Algorithms
Replace hand-written loops with named, tested tools: find, count, max_element, and friends.
- 10mCourse Recap & What's Next
The whole course on one page, the modern-C++ decision tables, and your roadmap onward.
Frequently asked questions
- Is C++ too hard as a first programming language?
- It is harder than Python, but not out of reach, and this course was rebuilt specifically for absolute beginners. Concepts arrive in small interactive steps with instant feedback. If you want the deepest possible foundation and are willing to move a little slower, starting with C++ is a legitimate choice.
- Will I have to manage memory manually with new and delete?
- You will understand what memory management is, because that understanding is the point of C++. But the course teaches modern practice: references, RAII, and smart pointers first, with raw new and delete shown so you can read older code, not as your default tools.
- Which C++ standard does the course follow?
- Modern C++ as it is written today: auto, range-based for loops, smart pointers, and the STL. You will be comfortable in any codebase using C++11 or later, which is the overwhelming majority.
- Is this course enough to start building games?
- It gives you the language layer: the classes, memory model, and STL fluency every engine assumes. Game development additionally needs an engine or graphics library, which you will be far better equipped to pick up once the C++ itself is not the bottleneck.
Ready to start C++ Essentials?
Create a free account to track progress, earn XP, and get instant help from the AI tutor as you code.
Create your free account