Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Problem-solving recipes

A step-by-step procedure for every problem type this course teaches — what to do first, what to do next, and how to tell which case you're in.

What are you being asked to do?

What's in front of you right now?

  • The build stopped with error: lines → Fix a build that won't compile. If the first error is inside a template, with pages of required from here and candidate notes → Fix a build that fails inside a template.
  • It builds, but crashes or gives a wrong answer → Debug a crash or a wrong answer. If someone reported the bug and the code has tests → Fix a reported bug, test first, which uses the debugging recipe inside it.
  • You're designing a class that owns something → Make a class copy and move correctly.
  • One file has grown and a second program or a test needs its code → Split code into a header, a source file and a CMake library.
  • You need data from a text file → Read a text file to the end.
  • Your project needs someone else's library → Add a library your project depends on. There are three versions in Chapter 24: FetchContent (§2), then vcpkg (§3), then Conan (§4). Each adds a path to the one before it.
  • Other projects need your library → Ship a shared library for other projects to use.

When the build fails

When it builds but misbehaves

Writing the code

Organizing a project

Libraries in and out