Introduction: What C++ Is For

Why this language is worth learning, where it lives in the industry, and how this tutorial is shaped.

What C++ Is

C++ is a systems language with high-level features. You get classes, templates, lambdas, ranges, and coroutines on top of direct memory control and zero-overhead abstractions. The compiler is willing to do almost anything you ask. That includes things you didn't mean to ask for.

It is not a small language. Pretending otherwise is the first mistake. The plan here is to teach the parts you need to be productive, in the order that makes the rest learnable.

Where C++ Shows Up (as of 2026)

  • Systems programming: kernels, drivers, runtime libraries, embedded firmware
  • Game development: Unreal, custom engines, graphics, physics, audio
  • High-frequency trading: where a microsecond pays for itself
  • Infrastructure: MySQL, MongoDB, Chrome, Firefox, LLVM, V8
  • AI/ML internals: TensorFlow and PyTorch are C++ under the Python
  • Embedded and IoT: anywhere a megabyte of RAM is generous

Salaries for C++ work tend to run 10 to 20 percent above general software roles, with HFT, engine work, and kernel work paying more. The trade-off is the bar to entry: you need to actually understand memory.

Where C++ Sits

+--------------------------------------------------------------+
|                  Programming Languages                       |
+--------------------------------------------------------------+
|  High-level (Python, JS)    | Performance: low to medium     |
|  - Garbage collected        | Control: limited               |
|  - Runtime overhead         | Use: apps, scripts, web        |
+-----------------------------+--------------------------------+
|  C++                        | Performance: maximum           |
|  - Manual memory control    | Control: complete              |
|  - Zero-cost abstractions   | Use: systems, games, HPC       |
|  - No garbage collector     |                                |
+-----------------------------+--------------------------------+
|  Low-level (Assembly)       | Performance: maximum           |
|  - Direct hardware access   | Control: complete              |
|  - No abstractions          | Use: bootloaders, firmware     |
+--------------------------------------------------------------+

C++ sits in a useful spot: high-level abstractions on top of low-level control. You can read a std::vector<int> and a for range loop on the same screen as a pointer cast and a placement-new.

The Zero-Cost Abstraction Idea

The core promise: you do not pay for what you do not use. A std::vector does not slow your hot loop down compared to a raw array, given the same access pattern.

// This high-level code...
std::vector<int> nums = {1, 2, 3, 4, 5};
auto sum = std::accumulate(nums.begin(), nums.end(), 0);

// ...compiles to assembly close to:
int nums[] = {1, 2, 3, 4, 5};
int sum = 0;
for (int i = 0; i < 5; i++) sum += nums[i];

The vector adds bookkeeping for size and capacity, but the loop body is the same. Compiler Explorer (godbolt.org) is the place to verify this for yourself.

What This Tutorial Covers

ChapterTopicWhat You Get
01Tooling and setupCompilers, build basics, sanitizers, formatters
02Basic syntaxTypes, control flow, functions, strings, arrays
03Memory managementPointers, references, RAII, smart pointers, move semantics
04OOPClasses, the rule of five, polymorphism
05Modern C++C++11 through C++23 features
06STLContainers, iterators, algorithms
07Build systemsCMake, package managers
08Best practicesIdioms, anti-patterns, performance
09ProjectsFive hands-on builds
10EcosystemStandards, compilers, libraries, careers

Prerequisites

  • Basic programming experience in any language
  • Comfortable with a command line
  • Familiar with variables, loops, functions, and a debugger

You do not need C experience. You do need patience for compile errors longer than this paragraph.

How to Use This Tutorial

  1. Type the examples. Copy-pasting feels productive and teaches nothing.
  2. Compile everything. Reading C++ errors is a core skill. The earlier you start, the better.
  3. Break things on purpose. Change a & to a *, see what happens. Make a deliberate buffer overflow with sanitizers on.
  4. Do the exercises. They are at the end of each chapter. The final chapter has full project builds.

Next Steps

Continue to 01-tooling-setup.md to install a compiler, write your first program, and meet the tools you will use every day.