C++ flashcards
Speed with structure: games, browsers, trading and engines.
What is C++, in one plain sentence?
C++ is a programming language for very fast programs that also lets you organise big code with and ready-made building blocks.
Tap to turn over. Swipe right if you know it, left to see it again.
What you will learn
Start from zero
- What C++ is and why it exists4 cards
- Key words4 cards
- Getting ready3 cards
Core basics
- Building programs2 cards
- Types and variables3 cards
- Strings2 cards
- Control flow and functions3 cards
- Classes2 cards
- Standard library containers2 cards
- Algorithms and errors3 cards
Next steps
- RAII and smart pointers3 cards
- Copy and move3 cards
- Templates2 cards
- Library types and polymorphism5 cards
- Tooling and threads3 cards
Go deeper
- Value categories and lifetime3 cards
- Undefined behaviour and safety3 cards
- Performance3 cards
- Compile-time programming2 cards
- Concurrency in depth2 cards
- Modern design4 cards
Final test and certificate
10 questions drawn fresh from the whole topic, about 15 minutes. Sign in, score 80% or more and get a free certificate with your name and a public check link anyone can open, such as an employer or a teacher. Not signed in? Try a practice test from the cards.
Take the final testAbout these cards
- Reviewed 26 October 2026
- CoversC++23C++26 (approved March 2026)GCC 15Clang 21
Checked against
C++ at a glance
C++ is a fast programming language that adds classes, safe resource handling and a large standard library on top of C, used where speed really matters.
Like a professional kitchen: sharp knives and powerful stoves that make great food fast, with rules and tools that keep the cooks safe.
Words you will meet
- Compiler
- The tool (like
g++orclang++) that turns your code into a program - Variable
- A named box that holds a value
- Type
- The kind of value a box holds, like a whole number or text
- Function
- A named set of steps that takes inputs and gives back a result
- Class
- A blueprint for a kind of thing, bundling its data and actions
- Object
- One real thing made from a class
- Reference
- Another name for an existing box, so no copy is made
- Standard library
- Ready-made tools that come with C++, like lists and text
The steps
- 1. Start from zero (11 cards): What C++ is, where it runs and the words you need.
- 2. Core basics (17 cards): Building, types, strings, functions, classes, containers, algorithms and exceptions.
- 3. Next steps (16 cards): RAII, smart pointers, moves, templates, modern library types, polymorphism, CMake and threads.
- 4. Go deeper (17 cards): Value categories, undefined behaviour, performance, compile-time code, atomics and C++26.
All 11 cards in Start from zero
- What is C++, in one plain sentence?
- C++ is a programming language for very fast programs that also lets you organise big code with classes and ready-made building blocks.
- Why was C++ created?
- In 1979 Bjarne Stroustrup wanted C's speed with a way to model real things, like accounts and shapes, as classes. It started as 'C with Classes' and became C++ in 1983.
- Where do you meet C++ in daily life?
- Game engines like Unreal, web browsers like Chrome and Firefox, Photoshop, Microsoft Office, databases such as MySQL, and much of the AI and robotics software stack.
- What everyday picture fits C++ well?
- A box of Lego Technic. Small parts (types and functions) snap into bigger machines (classes and libraries), and the standard library is a bag of tested parts you do not build yourself.
- What are a class and an object?
- A class is a blueprint, like the design of a bank account. An object is one real account made from it, with its own balance.
- What is a reference, in plain words?
- A second name for a box that already exists. Using it is like calling your friend Imran by his nickname: still the same person, no copy.
- What is the standard library?
- Tools that come with every C++ compiler: text (
std::string), growing lists (std::vector), lookups (std::map), sorting and much more. Thestd::prefix marks them. - How is C++ related to C?
- C++ grew from C and can use most C code, but adds classes, templates, automatic clean-up and a big library. Modern C++ code looks quite different from C.
- What do you need before you start?
- A free compiler (
g++,clang++, or Microsoft Visual Studio Community on Windows) and an editor. Basic comfort with typing commands helps. - What does a first C++ program look like?
- It includes
<print>, starts inmain, and prints withstd::println, the modern way since C++23. Older code usesstd::cout. - What will you be able to do after this topic?
- Write modern, safe and fast C++, read real code in games and systems, answer interview questions on memory and performance, and use the standard library well.
C++ cheatsheet
Build and check
g++ -std=c++23 -Wall -Wextra -O2 -o app main.cppCompile with warnings-fsanitize=address,undefinedCatch memory and UB bugs-fsanitize=threadFind data racescmake -B build -G Ninja && cmake --build buildConfigure and build with CMakectest --test-dir buildRun CMake testsclang-tidy src/*.cpp -- -std=c++23Static checks
Containers
std::vector<T>Default growing arraystd::array<T, N>Fixed size, on the stackstd::unordered_map<K, V>Hash lookupstd::map<K, V>Sorted keysstd::flat_map<K, V>Sorted, cache friendly (C++23)m.contains(k)Check key without insertingv.reserve(n)Allocate once up front
Ownership
std::make_unique<T>(args)Single ownerstd::make_shared<T>(args)Shared, counted ownerstd::weak_ptr<T>Observe without owningstd::move(x)Allow moving from xconst T&Read without copyingstd::string_view / std::span<T>Non-owning views
Algorithms and ranges
std::ranges::sort(v)Sort in placestd::ranges::find(v, x)First matchstd::ranges::count_if(v, pred)Count matchesv | std::views::filter(f) | std::views::transform(g)Lazy pipelinestd::ranges::to<std::vector>()Collect into a containerstd::erase_if(v, pred)Remove matching items
Modern helpers
std::println("{} {}", a, b)Print with format (C++23)std::optional<T>Maybe a valuestd::expected<T, E>Value or error (C++23)std::variant<A, B>One of fixed typesauto [k, v] = pair;Structured bindingsstd::jthread t{fn};Thread that joins itself