Skip to main content

C++ Guide

A guide and quick reference for C++ developers: to the point, with code examples and best practices.

A note on reading this guide

This guide is structured by topic, not by difficulty. There is no prescribed beginner-to-advanced path: jump straight to the section you need, whether that is std::vector, RAII or CMake Presets.

Topics

Run every example in a DevContainer

The guide comes with runnable C++ examples in code_examples. The repository ships a Docker DevContainer for Visual Studio Code, so you get the same ready-to-use toolchain on Windows, macOS and Linux without installing compilers yourself.

  • GCC 14
  • Clang 22
  • CMake 4.4
  • clangd
  • LLDB
  • clang-format
  1. Install Docker and the VS Code Dev Containers extension.
  2. Clone the repository and open the folder in VS Code.
  3. Run Dev Containers: Reopen in Container and pick cpp_guide.
  4. Build any example with CMake Tools, then run or debug it.

Enjoying the guide?

This guide is free and open source. A GitHub star helps other developers find it, and if it saved you time, you can support its development via PayPal.