This opening episode makes sure you're ready to learn C++. You will understand the basic skills you must master, set up the GCC compiler, the CMake and Ninja build tools, the GDB debugger, an editor, and verify the environment with your first program.

Welcome to the Learn C++ series! This series consists of 24 episodes that take you from the foundations all the way to production readiness. C++ is the language used to build operating systems, game engines, financial applications, and embedded systems, so mastering it opens the door to many performance-demanding fields.
But before writing your first line of C++, there are some basic skills and software you must have. C++ is a language that gives you full control over memory and hardware, so understanding how programs are executed will greatly determine your success. Without this foundation, the upcoming material will feel heavy.
Episode 0 is your roadmap: we will make sure the basic skills are in place, set up the compiler, build tools, debugger, and editor, then verify everything with your first program. Once this episode is done, the rest of the series can be followed comfortably.
You should be comfortable with programming logic concepts: how a problem is broken down into small steps, how if and loops control flow, and how functions wrap logic so it can be reused. You don't need to come from any particular language — understanding from Python, Java, or even JavaScript is enough — because these concepts are universal.
Understand the difference between variables, constants, and data types, as well as how arithmetic and logical operations work. Just as important: understand that variables are stored in memory with an address. In C++, you can access memory directly through pointers, so having a mental picture of how data is stored will be a big help.
This is what sets C++ apart from higher-level languages. C++ programs use several memory regions: the stack for local variables with limited size, the heap for dynamic allocation, static/global for long-lived data, and the code segment for machine instructions. You'll encounter the first two regions, stack and heap, almost every day.
Most of this series uses the command line. Get used to navigating directories, running commands, and reading output. Editors like VS Code, CLion, or Qt Creator are very helpful, but still understand what happens behind the build button.
The compiler turns C++ code into an executable. Pick one of the three main families:
This series uses GCC on Linux as the primary example, but all the code runs on Clang and MSVC with minimal adjustments.
For small projects, compiling manually with g++ is enough. For real projects, you need a build system. CMake is the de facto standard for managing cross-platform C++ projects, generating build files that can be run with Make or Ninja. Ninja is faster for large projects.
You're free to choose: Visual Studio on Windows, CLion which is powerful for refactoring, VS Code which is lightweight with C++ extensions, or Qt Creator for Qt-based applications. All of them pair well with GDB (Linux) or LLDB (macOS/Clang) for line-by-line debugging.
On Debian and Ubuntu based distributions, install everything with a single command:
sudo apt update
sudo apt install -y g++ gdb cmake ninja-build make clang clang-toolsThe command sudo apt install -y g++ gdb cmake ninja-build make clang clang-tools installs the GCC and Clang compilers, the GDB debugger, as well as CMake, Make, and Ninja all at once. On Fedora use sudo dnf groupinstall "Development Tools", and on Arch use sudo pacman -S gcc cmake ninja gdb.
Make sure all components are installed correctly:
g++ --version
cmake --version
ninja --version
gdb --versionGCC version 11 and above supports C++20 well, and GCC 13 and above supports most of C++23. If your version is older, upgrade first so you can follow every episode, especially episodes 16 and 23.
Now it's time to make sure everything works. Create a main.cpp file, compile it, and run it:
cat > main.cpp <<'EOF'
#include <iostream>
int main() {
std::cout << "Halo, C++!\n";
return 0;
}
EOF
g++ -std=c++20 -Wall -Wextra main.cpp -o main
./mainThe line #include <iostream> loads the standard input-output stream, std::cout sends text to the screen, and return 0 signals that the program finished successfully. The -Wall -Wextra flags enable all the warnings you'll use constantly throughout this series.
The debugger matters from the start. Verify that GDB can load the executable:
gdb -batch -ex run ./mainIf the output shows Halo, C++!, your environment is ready. For the editor, install the C/C++ extension in VS Code, or follow the CLion installation wizard. A system with at least 8GB of RAM is recommended so compilation and debugging run smoothly.
Tip
Get in the habit of checking compiler warnings from day one. Keep the -Wall -Wextra flags permanently enabled on all your projects.
Here's what to take away:
In the next episode, episode 1, we'll discuss the history, background, and why you need C++ — from the birth of C++ by Bjarne Stroustrup, the standardization journey from C++98 to C++23, its role in operating systems and game engines, and the problems it solves compared to traditional approaches. Make sure your toolchain is ready, because the Learn C++ journey is just beginning!