Learn C++
five minutes at a time.
C++ is fast, powerful and everywhere in games, engines and performance-critical software. It gives you the control of C with classes and a rich standard library on top.
Start the C++ course free60 lessons · about 11 hours · beginner friendly
Your first program
#include <iostream>
int main() {
std::cout << "Hello, Pebble!\n";
}Output
Hello, Pebble!The Codiqo C++ course starts at std::cout and covers types, conditions, loops, vectors, strings, functions, references, classes and smart pointers. Every example was compiled with warnings treated as errors.
How the C++ lessons work
Learn in small steps
Each lesson explains one idea with worked examples, then asks you about it straight away. About five minutes each.
Write real code
Predict the output, fix the bug, fill the gap and build programs line by line. Every lesson ends with a short program you write yourself, and we run it for real.
Keep it going
Earn XP, open chests, climb weekly leagues and keep your streak alive, with Pebble the penguin cheering you on and Terry the mentor giving hints.
The full C++ curriculum
Foundations
Output, variables, types, input and logic.
First Steps: Write your first C++ programs.
- Hello, C++: Print with std::cout and understand main()
- Variables and Types: Store values in int, double, char, bool and std::string
- Arithmetic: Calculate with + - * / % and predict integer division
- Reading Input with cin: Read numbers and words from the keyboard
Strings and Types: Work with text and convert between types.
- std::string Basics: Join, measure and index strings
- String Methods: Use substr, find, replace and getline
- auto, const and Conversions: Let the compiler infer types and convert with static_cast
- Project: Receipt Printer: Print a neatly formatted receipt
Logic: Make true or false decisions.
- Comparisons and bool: Compare values and print booleans
- Logical Operators: Combine conditions with && || and !
- Updating Values: Use ++, += and the conditional operator
- Project: Eligibility Checker: Decide eligibility from several conditions
Control Flow
Decisions, loops and functions.
Making Decisions: Run different code depending on conditions.
- if and else: Run code only when a condition is true
- else if and Nesting: Choose between several paths
- switch: Choose between many exact values
- Project: Grade Calculator: Turn scores into grades
Loops: Repeat work with while and for.
- while and do-while: Repeat while a condition is true
- for Loops: Count with for and nest loops
- break, continue and Range-for: Control loops and visit every item
- Project: FizzBuzz: Solve the classic FizzBuzz problem
Functions: Reuse code with functions.
- Defining Functions: Write functions with parameters and return values
- Defaults and Overloading: Give parameters defaults and overload by type
- References: Change arguments and avoid copies with & and const&
- Project: Unit Converter: Build a converter from small functions
Data Structures
Vectors, maps, sets and memory.
Vectors: Store lists of values with std::vector.
- Creating Vectors: Create vectors and read and change items
- Growing and Looping: Use push_back, size and range-for loops
- Algorithms: Use sort, find, count and accumulate
- Project: Score Statistics: Summarise a list of scores
Maps and Sets: Look things up by key and keep unique values.
- std::map: Store key-value pairs in order
- std::set: Keep sorted, unique values
- Counting with Maps: Count occurrences and find the most common
- Project: Word Counter: Count the words in a piece of text
Pointers and Memory: Understand addresses and ownership.
- Pointers: Use & and * to work with addresses
- new, delete and Their Problems: See why manual memory is risky
- Smart Pointers: Own memory safely with unique_ptr and make_unique
- Project: Inventory: Manage items with vectors and smart pointers
Object-Oriented C++
Classes, inheritance, errors and a complete project.
Classes: Model things with your own types.
- Classes and Objects: Define classes with members and methods
- Constructors: Initialise objects with constructors and initialiser lists
- Encapsulation: Protect data with private members and const methods
- Project: Bank Account: Model an account with safe deposits and withdrawals
Inheritance and Errors: Share behaviour and handle problems.
- Inheritance: Build classes on top of other classes
- Virtual Functions: Use polymorphism through base-class references
- Exceptions: Throw and catch errors
- Project: Shapes: Compute areas through a shared interface
Capstone Project: Plan and build a complete C++ program.
- Planning and Modelling: Turn an idea into classes
- Core Logic: Implement the main features
- Errors and Testing: Handle bad input and test with assert
- Polishing: Improve output, structure and readability
Questions about the C++ course
Is the C++ course free?
Yes. All 60 C++ lessons, practice sessions, leagues and achievements are free. Codiqo Plus is optional and adds unlimited Compile Fuel.
Is it good for complete beginners?
Yes. It starts from your very first line of C++ and explains every idea before asking you about it. If you already know some C++, a quick check lets you skip ahead.
How long does it take?
About 11 hours in all: 60 lessons of roughly five to ten minutes, in 4 chapters of 3 units. Most learners do a lesson or two a day.
Do I need to install anything?
No. Codiqo works in your browser and on iPhone and Android. The programs you write run on our servers in a locked-down sandbox, so there's nothing to set up.
What will I build?
Every lesson ends with a short program you write yourself, and the course finishes with "Capstone Project": Plan and build a complete C++ program.
Other courses
Learn Python · Learn JavaScript · Learn C · Learn Java · Learn C#