C++ Roadmap
This C++ Roadmap is a free, full-text syllabus of 127 lessons in 20 stages, starting with Introduction to Language and ending with Working with Libraries. It suits anyone who wants to learn C++, whether new to it or filling gaps. There is no fixed length: every lesson is open from the start, so you go at your own pace and skip what you already know.
Last updated
Reading is open to everyone. Sign in to join this roadmap and track what you finish.
Continue learning
1. Introduction to LanguageIntroduction to Language
0%Introduction to Language
4 topics · 3 sub-topics · 0 completed
The diagram draws the same 127 lessons as a map, with lines showing the order. It needs JavaScript; the full syllabus below lists every lesson as text.
Full syllabus: every lesson in the C++ roadmap
20 stages and 127 lessons, in the order the roadmap suggests. Every lesson is free to read and open from the start.
Stage 1: Introduction to Language
Introduction to Language
C++ is a general-purpose programming language known for its performance, efficiency, and control over hardware. It supports both procedural and object-oriented programming paradigms, making it versatile for a wide range of applications, from system programming to game development. C++ builds upon the C language,…
What is C++?
C++ is a powerful, general-purpose programming language. It is an extension of the C language, adding features like object-oriented programming, which allows you to structure code into reusable components. C++ is known for its high performance, efficiency, and control over system resources, making it suitable for a…
Why use C++
C++ is a powerful, general-purpose programming language known for its performance and control over system resources. It combines high-level and low-level features, allowing developers to write efficient code for a wide range of applications. This includes operating systems, game development, embedded systems,…
C vs C++
C and C++ are both programming languages, with C++ evolving from C. C is a procedural language focused on structured programming using functions. C++ expands upon C by adding object-oriented programming (OOP) features like classes, inheritance, and polymorphism, enabling more complex and modular software design.…
Stage 2: Setting up your Environment
Setting up your Environment
Setting up your environment in C++ involves configuring your computer with the necessary tools and software to write, compile, and run C++ programs. This typically includes installing a C++ compiler (like GCC or Clang), an integrated development environment (IDE) or text editor, and potentially a build system for…
Installing C++
To use C++, you need to set up the necessary tools on your system to compile and run C++ code. This typically includes a compiler (like GCC or Clang), a build system (like Make or CMake), and an Integrated Development Environment (IDE) or text editor for writing code. The specific steps vary depending on your…
Code Editors / IDEs
Choosing the right code editor or IDE is a crucial first step for any C++ developer. These tools provide a platform for writing, editing, and managing your code, often including features like syntax highlighting, code completion, debugging tools, and build automation. Popular options range from lightweight and…
Running your First Program
This involves configuring your system to compile and execute C++ code. You'll need a compiler (like GCC or Clang), an IDE or text editor for writing code, and potentially a build system to manage the compilation process. A basic "Hello, World!" program is typically used to verify the setup and demonstrate the…
Stage 3: Basic Operations
Basic Operations
Understanding fundamental operations is crucial for any C++ developer. This foundational knowledge includes arithmetic operations such as addition, subtraction, multiplication, and division, as well as comparison operations (e.g., equal to, not equal to, greater than) used in conditional logic. Mastering these…
Arithmetic Operators
Arithmetic operators are fundamental building blocks in C++ programming, allowing you to perform mathematical calculations directly within your code. These operators work on numeric data types such as integers and floating-point numbers, enabling addition (+), subtraction (-), multiplication (\), division (/), and…
Logical Operators
Logical operators in C++ allow you to combine or modify boolean expressions, resulting in a final boolean value of either true (1) or false (0). These operators are crucial for controlling the flow of your program based on multiple conditions. C++ provides three main logical operators: AND (&&), which returns true…
Bitwise Operators
Bitwise operators in C++ allow direct manipulation of individual bits within integer data types. These operators work by treating values as sequences of bits and performing operations at the bit level. Common bitwise operators include AND (&), OR (|), XOR (^), NOT (~), left shift (<<), and right shift (). They are…
Stage 4: Control Flow & Statements
Control Flow & Statements
Control flow in C++ dictates the order in which statements are executed. It allows programs to make decisions, repeat actions, and execute different code blocks based on conditions. Statements like if, else if, and else enable conditional execution, while loops such as for, while, and do-while facilitate…
if else / switch / goto
if-else, switch, and goto are fundamental control flow mechanisms in C++. if-else constructs enable programs to execute different code blocks based on boolean conditions. The switch statement provides a way to efficiently handle multiple possible values of a single variable. The goto statement allows for an…
for / while / do while loops
Loops are fundamental control flow structures that enable the repetition of code blocks based on a condition. C++ provides three primary loop types: for, while, and do-while. The for loop is ideal when the number of iterations is known beforehand, while the while loop continues execution as long as a specified…
Stage 5: Pointers and References
Pointers and References
Pointers and references are fundamental concepts in C++ that allow indirect access to variables. A pointer stores the memory address of another variable, enabling dynamic memory management and manipulation. A reference, on the other hand, acts as an alias for an existing variable, providing a direct way to access…
References
In C++, a reference is an alias for an existing variable. It provides an alternative name to access the same memory location. References are similar to pointers in some ways, but they have key differences: a reference must be initialized when it's created, and once initialized, it cannot be changed to refer to a…
Memory Model
The C++ memory model defines how a program organizes and manages memory during execution. It divides memory into different segments, each serving a specific purpose: the stack for function calls and local variables, the heap for dynamic memory allocation, the data segment for global and static variables, and the…
Lifetime of Objects
Object lifetime in C++ dictates when an object comes into existence and when it ceases to exist. This crucial concept influences memory management and program correctness. C++ defines four storage durations: static (exists for the program's duration), thread (exists for a thread's duration), automatic (exists…
Smart Pointers
Smart pointers are classes that behave like regular pointers but provide automatic memory management. They help prevent memory leaks by automatically deallocating the memory they point to when they are no longer needed. This is achieved through techniques like reference counting and RAII (Resource Acquisition Is…
weak_ptr
weakptr is a smart pointer in C++ that holds a non-owning reference to an object managed by a sharedptr. It doesn't participate in the object's ownership count, meaning that it doesn't prevent the object from being destroyed if the sharedptrs owning the object go out of scope. Its primary use is to detect if the…
shared_ptr
sharedptr is a smart pointer in C++ that manages dynamically allocated memory. It enables multiple pointers to safely own and share the same object. When the last sharedptr pointing to an object goes out of scope, the managed object is automatically deleted, preventing memory leaks. It achieves this by maintaining…
unique_ptr
uniqueptr is a smart pointer in C++ that provides exclusive ownership of a dynamically allocated object. It ensures that only one uniqueptr can point to a given object at any time, preventing memory leaks by automatically deleting the managed object when the uniqueptr goes out of scope or is explicitly reset.…
Raw Pointers
Raw pointers are variables that store the memory address of another variable. They directly hold the location in memory where a value is stored, allowing you to access and manipulate that value. Using raw pointers requires careful memory management as you are responsible for allocating and deallocating the memory…
New/Delete Operators
The new and delete operators in C++ are used for dynamic memory allocation and deallocation. new allocates a block of memory on the heap and returns a pointer to the beginning of that block. delete then releases the memory block previously allocated by new, making it available for other uses. Proper use of new and…
Memory Leakage
Memory leakage occurs when dynamically allocated memory is no longer accessible by the program, but the program fails to release it back to the operating system. This results in the memory being unusable by other parts of the program or other applications, gradually reducing the available memory and potentially…
Stage 6: Data Types
Data Types
Data types in C++ categorize the kind of values a variable can hold, influencing memory usage and allowable operations. C++ offers fundamental types like int for integers, float and double for floating-point numbers, char for single characters, and bool for logical values. Beyond these basics, derived types such as…
Static Typing
Static typing, as implemented in C++, is a system where the data type of a variable is known and checked at compile time, before the program runs. This means each variable is declared with a specific type (like int, double, or char), and the compiler enforces that only values of that type are assigned to it. While…
Dynamic Typing
While C++ is fundamentally a statically-typed language where data types are checked at compile time, it provides mechanisms to achieve a degree of dynamic typing. This involves determining the data types of variables during runtime, primarily through the use of void pointers, which can point to any data type…
Stage 7: Functions
Functions
Functions in C++ are self-contained blocks of code designed to perform specific tasks, promoting code reusability and modularity. They come in two main types: standard library functions (pre-built functions like sort() and sqrt()) and user-defined functions (created by the programmer). Defining a function involves…
Operator Overloading
Operator overloading in C++ is a feature that allows you to redefine the way operators work for user-defined types (such as classes and structs). It lets you specify how operators like +, -, \, ==, etc., behave when applied to objects of your class. Visit the following resources to learn more:
Lambdas
Lambdas, also known as lambda expressions, are a concise way to define anonymous functions directly within the code where they are needed. They are essentially nameless functions that can capture variables from the surrounding scope. Lambdas are particularly useful for short, self-contained operations, making code…
Static Polymorphism
Static polymorphism, also known as compile-time polymorphism, enables the execution of different code depending on the type of data it's handling, but this determination happens at compile time. In C++, static polymorphism is primarily achieved through function overloading, which allows defining multiple functions…
Function Overloading
Function overloading in C++ allows multiple functions to share the same name, provided they differ in the number or types of parameters. This facilitates compile-time polymorphism, enhancing code readability and maintainability by enabling functions to perform similar operations on different data types or argument…
Stage 8: Structuring Codebase
Structuring Codebase
Structuring your codebase involves organizing and modularizing code for better maintainability, efficiency, and readability. This enhances collaboration, simplifies feature addition, and accelerates debugging. In C++, techniques like namespaces, include guards, header/source file separation, and consistent code…
Forward Declaration
Forward declaration is declaring an identifier (like a class, function, or variable) to the compiler before its full definition is provided. This informs the compiler about the existence and type of the identifier, allowing it to be used in limited contexts, such as pointer or reference usage, without requiring the…
Headers / CPP Files
In C++, organizing code effectively involves splitting programs into header and source files. Header files (with extensions like .h or .hpp) declare interfaces such as classes, functions, and variables, acting as blueprints for other parts of the code. Source files (with the .cpp extension) then implement the…
Namespaces
Namespaces in C++ provide a way to organize code into logical groups, preventing naming conflicts when using code from different libraries or parts of a large project. They act as containers for variables, functions, classes, and even other namespaces. You can access elements within a namespace using the scope…
Scope
Scope in C++ defines the visibility and lifetime of variables, functions, and other identifiers within a program. It dictates where these entities can be accessed and how long they persist in memory. C++ employs several types of scope, including global scope (accessible program-wide), local scope (confined to a…
RTTI
Run-Time Type Identification (RTTI) in C++ allows you to determine the type of an object during program execution. This is particularly useful when working with polymorphism and inheritance. C++ provides two primary mechanisms for RTTI: the typeid operator, which retrieves type information, and the dynamiccast…
Virtual Methods
Virtual methods are the cornerstone of dynamic polymorphism in C++ classes. They enable a derived class to provide its own specific implementation of a function that is already defined in a base class. When you call a virtual function through a base class pointer or reference, the runtime determines which version…
Virtual Tables
Virtual tables (vtables) are compiler-generated lookup tables used in C++ to implement dynamic polymorphism, especially with virtual functions. Each class that declares or inherits virtual functions has a vtable, which contains pointers to the most derived versions of those virtual functions for that class. When a…
Dynamic Polymorphism
Dynamic polymorphism is a feature in C++ that allows objects of different classes to be treated as objects of a common type. This is achieved through virtual functions, where a derived class can override a function defined in its base class. When a virtual function is called through a base class pointer or…
Object Oriented Programming
Object-oriented programming is a style of programming centered around "objects," which combine data (attributes) and functions (methods) that operate on that data. OOP enables you to create modular, reusable, and maintainable code by organizing your programs around these objects and their interactions. Key concepts…
Stage 9: Structures and Classes
Structures and Classes
Structures and classes in C++ are blueprints for creating user-defined data types. They allow you to group variables (members) of different data types under a single name, enabling you to represent complex entities. The key distinction lies in their default access control: structure members are public by default,…
Stage 10: Language Concepts
Language Concepts
C++'s foundation rests on several core language concepts that enable the creation of efficient and robust applications. These concepts encompass fundamental building blocks like variables and data types for storing information, control structures for managing program flow with conditionals and loops, and functions…
auto (Automatic Type Deduction)
auto is a keyword in C++ introduced in C++11 that enables automatic type deduction. It allows the compiler to infer the data type of a variable from its initialization expression at compile time. This simplifies code by reducing the need to explicitly declare types, particularly when dealing with complex or less…
Type Casting
Type casting in C++ involves converting a variable's data type to another. C++ provides several casting methods: C-style casting (inherited from C), staticcast (for explicit conversions at compile time), dynamiccast (for safe downcasting in class hierarchies), reinterpretcast (for low-level bitwise…
static_cast
staticcast is a C++ casting operator primarily used for performing conversions between related types at compile time. This includes converting between primitive data types like int and float, and upcasting or downcasting within inheritance hierarchies. It offers a level of type safety over C-style casts by…
const_cast
constcast is a C++ casting operator that allows you to explicitly add or remove the const or volatile qualifier from a variable's type. This essentially enables you to modify an object that was initially declared as const or pass a const object to a function that expects a non-const argument. It's a powerful tool…
dynamic_cast
dynamiccast is a C++ casting operator primarily used within polymorphic class hierarchies to safely convert pointers or references from a base class to a derived class. Unlike static casts, it performs a runtime check to ensure the validity of the conversion. If the object being cast is not actually an instance of…
reinterpret_cast
reinterpretcast is a powerful but potentially dangerous type of casting operator in C++. It allows you to convert between unrelated pointer types, integer types, or between pointers and integers. Unlike other casts, it doesn't perform any type checking or data conversion. Its primary function is to reinterpret the…
Undefined Behavior (UB)
Undefined behavior in C++ arises when a program violates the rules defined by the C++ standard, leading to unpredictable and unspecified outcomes. This can stem from actions such as accessing uninitialized variables, dereferencing null pointers, performing out-of-bounds memory access, or dividing by zero. The…
Argument Dependent Lookup (ADL)
Argument Dependent Lookup (ADL), also known as Koenig Lookup, is a feature in C++ that extends the function lookup process by allowing the compiler to search for functions in the namespaces of the function arguments' types. This is especially useful when working with overloaded operators and functions defined…
Name Mangling
Name mangling, also known as name decoration, is a technique compilers use to encode extra information like scope, type, and linkage into identifier names (like function and variable names). This allows C++ to support function overloading, where multiple functions can share the same name but have different…
Macros
Macros in C++ are preprocessing directives that instruct the preprocessor to perform text substitutions before compilation. Defined using define, they enable you to create symbolic constants, function-like constructs, and control conditional compilation. Macros can help in code optimization and customization, but…
Multiple Inheritance
Multiple inheritance in C++ allows a class to inherit from multiple base classes, combining their properties and behaviors into a single derived class. This means a class can inherit data members and member functions from several parent classes, offering a way to create more complex and specialized classes.…
Diamond Inheritance
Diamond inheritance arises in C++ when a class inherits from multiple classes that, in turn, inherit from a common base class, creating a diamond-shaped hierarchy. This can lead to ambiguity because the derived class inherits multiple copies of the base class's members. To resolve this issue, virtual inheritance is…
Stage 11: Exception Handling
Exception Handling
Exception handling in C++ is a mechanism for managing runtime errors and unexpected events, preventing abrupt program termination. It uses try, catch, and throw keywords to monitor code blocks for exceptions, handle specific exception types, and signal error conditions, respectively. The noexcept specifier ensures…
Exit Codes
Exit codes are numerical values returned by a program to the operating system upon completion, signaling whether the execution was successful or encountered errors. A return value of 0 typically indicates success, while non-zero values denote failure, with the specific meaning of each non-zero code being…
Exceptions
Exception handling in C++ provides a mechanism to manage runtime errors, ensuring program stability. This is achieved using try, catch, and throw blocks. The try block encloses code that might generate an exception. If an error occurs, a throw statement creates an exception object, which is then caught and handled…
Access Violations
An access violation occurs when a program tries to read from or write to a memory location that it doesn't have permission to access. This is a common error in C++ that can arise from issues like dereferencing null or invalid pointers, accessing arrays beyond their bounds, or attempting to use memory that has…
Stage 12: Standard Library + STL
Standard Library + STL
The C++ Standard Library is a comprehensive collection of classes and functions, extending the core language with ready-to-use tools for common programming tasks. A crucial part of the Standard Library is the Standard Template Library (STL), which offers pre-built, templatized components like containers (vectors,…
Rule of Zero, Five, Three
The Rule of Zero, Three, and Five are guidelines for managing resources within C++ classes and structs. The Rule of Zero suggests letting the compiler handle resource management if your class doesn't explicitly manage any. If your class manages resources, pre-C++11 it adhered to the Rule of Three, requiring you to…
Type Traits
Type traits in C++ are a powerful set of tools, implemented as template classes, found in the <typetraits header. They provide a mechanism to inspect and query the properties of types at compile time, such as whether a type is a pointer, arithmetic type, or function. This allows you to write generic code that…
SFINAE
SFINAE is a core principle in C++ template metaprogramming that enables the compiler to choose the most suitable function or class template specialization during compilation. It leverages the idea that when the compiler attempts to substitute template arguments into a template and the substitution results in an…
Template Specialization
Template specialization in C++ allows you to provide custom implementations of templates for specific types or type patterns. This becomes useful when the generic template implementation doesn't suit a particular type, requiring tailored logic for optimization or specific behavior. Template specialization comes in…
Full Template Specialization
Full template specialization in C++ provides a way to define specific implementations of a template (class or function) for particular types. This allows you to customize the behavior of a template when it's instantiated with a specific set of template arguments, enabling optimized code or special handling for…
Partial Template Specialization
Partial template specialization in C++ allows you to create specialized versions of a template for specific subsets of types. This is achieved by providing a new template definition that is selected by the compiler when the template arguments match the specified criteria. It offers a way to customize template…
Variadic Templates
Variadic templates, introduced in C++11, provide a way to create templates that can accept a variable number of arguments. Using the ellipsis (...) notation, you can define parameter packs that represent zero or more arguments of potentially different types. This allows for the creation of functions and classes…
Stage 13: Templates
Templates
C++ Templates provide a way to write generic code by allowing functions and classes to operate with different data types without being rewritten for each type. This is achieved by using type parameters or placeholders that are later replaced with actual data types when the template is instantiated, promoting code…
Stage 14: Debuggers
Debuggers
Debuggers are indispensable tools in C++ development, enabling developers to identify, analyze, and resolve defects within their code. These tools allow you to step through your code, inspect variables, and understand the program's execution flow, ultimately leading to more robust and reliable software. Several…
Iterators
Iterators in C++'s Standard Template Library (STL) are essential tools for traversing and accessing elements within containers like vectors, lists, and arrays. They act as generalized pointers, offering a way to interact with container elements without needing to know the container's underlying implementation. C++…
iostream
iostream is a fundamental header in the C++ Standard Library that handles input and output (I/O) operations. It provides classes like istream for input, ostream for output, and iostream for combined I/O. cin, cout, cerr, and clog are predefined objects within iostream for standard input, standard output, standard…
Algorithms
The C++ Standard Template Library (STL) offers a rich collection of generic algorithms that operate on various container types. These algorithms, found primarily in the <algorithm header, provide functionalities for common tasks like sorting, searching, and sequence manipulation. They promote code reusability and…
Date / Time
The C++ chrono library, part of the Standard Template Library (STL), offers tools for handling dates and times. It allows you to represent time spans as durations (e.g., seconds, minutes, hours), specific moments as timepoints based on clocks, and access the current time using different clock types like…
Multithreading
Multithreading allows concurrent execution of multiple threads within a single process, enhancing application performance by enabling parallel task execution. C++ provides multithreading support through the <thread library (introduced in C++11), enabling thread creation, argument passing, and synchronization…
Containers
C++ Containers are a part of the Standard Template Library (STL) that provide data structures to store and organize data. There are several types of containers, each with its own characteristics and use cases. Here, we discuss some of the commonly used containers:
WinDBg
WinDbg, a debugger included in the Microsoft Windows SDK, is a powerful tool for analyzing and debugging Windows applications, both in user mode and kernel mode. It offers a graphical interface and a comprehensive set of features for tasks like analyzing crash dumps, setting breakpoints, and stepping through code…
GDB
GDB, the GNU Project Debugger, is a command-line tool essential for debugging C and C++ programs. It allows developers to examine a program's execution, set breakpoints, step through code, inspect variables, and analyze call stacks to identify and fix bugs. By using GDB, developers gain deep insight into the…
Debugging Symbols
Debugging symbols are essential for effective debugging in C++. They provide debuggers with information about the program's structure, source code relationships, and variable representations, allowing developers to step through code, inspect variables, and understand the program's behavior. These symbols can be…
Understanding Debugger Messages
Debugger messages are notifications from a debugger that aid in identifying issues within C++ code. These messages manifest as warnings, errors, or informational outputs, offering insight into the program's state and specific problems encountered during debugging. Error messages flag code issues preventing…
Stage 15: Standards
Standards
C++ standards are sets of rules and guidelines that define the C++ programming language. These standards ensure consistency and portability across different compilers and platforms. Each standard introduces new features, improvements, and sometimes deprecates older functionalities. The current standard is C++23.
C++ 11 / 14
C++11 and C++14 are significant updates to the C++ language, introducing features to enhance its power and usability. C++11 brought in features like auto for type inference, range-based for loops for simpler iteration, lambda functions for creating anonymous functions, nullptr for safer null pointer representation,…
C++ 23
C++23 is the latest version of the C++ standard, building upon previous iterations to introduce new features, library enhancements, and language improvements. It aims to simplify development, improve performance, and provide more modern tools for C++ programmers. This standard incorporates features like…
C++ 20
C++20 represents a significant evolution of the C++ language, introducing key features aimed at improving code clarity, efficiency, and concurrency. Highlights include Concepts, which enforce constraints on template parameters for better error messages; Ranges, a new way to work with sequences of values enhancing…
C++ 17
C++17 is a significant update to the C++ language, offering new features and enhancements that improve code expressiveness and efficiency. This version introduces features such as structured bindings for easier data unpacking, if and constexpr if statements for compile-time conditional logic, and inline variables…
C++ 0x
C++11, formerly known as C++0x, represents a significant evolution of the C++ language standard, finalized in 2011. This version introduced features like automatic type inference with auto, simplified container iteration using range-based for loops, the ability to create anonymous functions via lambda expressions,…
Stage 16: Idioms
Idioms
C++ idioms are established patterns and techniques used by developers to solve common programming challenges in a standardized and effective manner. These idioms promote code that is more efficient, maintainable, and less prone to errors by leveraging the features and principles of C++. Examples include Resource…
Non-Copyable / Non-Moveable
The non-copyable/non-moveable idiom in C++ prevents objects of a class from being copied or moved. This is achieved by deleting the copy constructor, copy assignment operator, move constructor, and move assignment operator. It's useful for classes that manage exclusive resources, ensuring that only one instance…
Erase-Remove
The Erase-Remove idiom is a common C++ technique used to efficiently remove elements from a container (like std::vector, std::list, etc.). It involves using std::remove (or std::removeif) to move the elements to be removed to the end of the container, followed by using the container's erase() method to actually…
Copy and Swap
Copy and Swap is a C++ idiom used to implement the assignment operator in a safe and efficient manner. It works by creating a copy of the right-hand side object, then swapping the internal state of the copy with the object being assigned to. The temporary copy, now holding the original state, is then destroyed when…
Copy on Write
The Copy-on-Write (CoW) idiom is an optimization technique used to defer or eliminate the cost of copying resources until the first write operation. Instead of creating a new copy of an object immediately, the original object and the "copy" share the same underlying resource. Only when one of the objects attempts…
RAII
RAII (Resource Acquisition Is Initialization) is a C++ idiom that ties the management of resources to the lifetime of objects. Resources are acquired during object construction and automatically released when the object is destroyed, typically in the destructor. This ensures resources are properly managed, even in…
Pimpl
The Pimpl (Pointer to Implementation) idiom is a C++ technique used to hide the implementation details of a class. This is achieved by declaring a private implementation class and holding a pointer to it within the main class. The public interface remains clean, and compile-time dependencies are significantly…
CRTP
The Curiously Recurring Template Pattern (CRTP) is a C++ idiom where a class template inherits from its own specialization. This technique achieves static polymorphism, offering an alternative to runtime polymorphism using virtual functions. CRTP allows customization of base class behavior without virtual function…
Stage 17: Compilers
Compilers
A compiler is a program that translates source code from one programming language into another, often machine code, enabling a computer to execute the instructions. In C++, compilers take your human-readable code and convert it into an executable program. Popular options include GCC, Clang, MSVC, and ICC, each with…
Compiler Stages
The compilation process in C++ transforms human-readable source code into an executable program through four distinct stages. These stages are: Preprocessing, which handles directives like include and macro replacements; Compilation, where the preprocessed code is translated into assembly language; Assembly, which…
Compilers and Features
C++ compilers translate human-readable C++ code into machine-executable code. They offer various features, including optimization techniques to improve program performance by eliminating redundancies and restructuring code, debugging information generation to aid in troubleshooting, and warning systems to flag…
Stage 18: Build Systems
Build Systems
Build systems in C++ automate the compilation, linking, and execution of source code, managing the complexity of the build process to produce executables or libraries. Common examples include GNU Make, which uses Makefiles to track dependencies and timestamps, and CMake, a cross-platform system that generates build…
CMAKE
CMake is a cross-platform build system generator. It uses configuration files (CMakeLists.txt) to describe the build process and generates native build files like Makefiles or project files for IDEs like Visual Studio. CMake simplifies the build process, especially for complex projects, by abstracting the…
Makefile
A Makefile is a configuration file used by the make utility to automate the process of compiling and linking code in a project. It defines a set of rules and dependencies that specify how to build the final executable or library from source code. It consists of variables, rules with targets, prerequisites, recipes,…
Ninja
Ninja is a small, fast build system designed for speed and efficiency. Instead of directly interpreting project structure, it executes pre-generated build plans. This allows it to build only what's necessary, leading to significantly faster build times, particularly in large projects. It's commonly used with…
Stage 19: Package Managers
Package Managers
Package managers are essential tools that streamline the process of incorporating external libraries and dependencies into C++ projects. They automate the tasks of installing, updating, and managing these components, simplifying development and promoting code reuse. Popular options in the C++ ecosystem include…
Stage 20: Working with Libraries
Working with Libraries
Libraries in C++ are collections of pre-written code designed to be reused in different programs, offering functionalities like specialized algorithms, data structures, or system interfaces. These libraries come in two main types: static libraries, which are linked directly into your executable at compile time, and…
Licensing
Licensing governs how you can use, modify, and distribute software libraries, particularly crucial when integrating third-party code into your C++ projects. Common open-source licenses like MIT, GPL, and Apache 2.0 each provide different levels of freedom and obligations. The MIT License is permissive, allowing…
Library Inclusion
In C++, library inclusion is the process of making external code available to your program. This is achieved primarily through the include preprocessor directive, which allows you to incorporate header files containing declarations of functions, classes, and other entities. Header files from the standard library…
Boost
Boost is a set of peer-reviewed, portable C++ source libraries. It provides a wide range of utilities and tools that can significantly enhance your C++ development, covering areas like data structures, algorithms, mathematical functions, concurrency, and more. Boost libraries are designed to integrate well with the…
OpenCV
OpenCV (Open Source Computer Vision Library) is a comprehensive collection of programming functions primarily aimed at real-time computer vision. It encompasses a vast array of algorithms for image processing, object detection, video analysis, and machine learning, providing developers with tools to analyze and…
POCO
POCO (Portable Components) is a C++ class library that simplifies network-centric, portable applications. It offers a comprehensive set of tools and components for tasks such as networking, data processing, and basic utilities. POCO focuses on being modular and cross-platform.
Tensorflow
TensorFlow is an open-source software library developed by Google, primarily used for numerical computation and large-scale machine learning. It allows developers to create and train machine learning models using a variety of tools, libraries, and community resources. TensorFlow focuses on deep learning tasks like…
protobuf
Protobuf (Protocol Buffers) is a language-neutral, platform-neutral, extensible mechanism for serializing structured data. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams,…
spdlog
spdlog is a fast and cross-platform C++ logging library. It provides a simple interface for writing log messages to different destinations such as the console, files, or custom sinks. It supports various log levels, formatting options, and asynchronous logging, making it suitable for projects that require efficient…
gRPC
gRPC is a high-performance, open-source framework developed by Google for building remote procedure calls (RPCs). It uses Protocol Buffers as its Interface Definition Language (IDL) and relies on HTTP/2 for transport. gRPC enables client applications to directly call methods on a server application on a different…
pybind11
pybind11 is a lightweight header-only library that allows you to create Python bindings for your existing C++ code. It essentially lets you expose C++ functions, classes, and data structures to Python, enabling seamless interoperability between the two languages. This allows you to leverage the performance of C++…
fmt
fmt is a modern formatting library for C++. It provides a simple and efficient way to format text, similar to Python's str.format() or C's string.Format(). It offers compile-time checks for format string correctness and generally results in faster and safer string formatting compared to traditional methods like printf.
opencl
OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of CPUs, GPUs, and other processors. It allows developers to harness the parallel processing power of different types of hardware using a unified API, enabling acceleration of computationally…
ranges_v3
Ranges v3 is a modern C++ library that provides tools for working with sequences of elements in a more composable and expressive way. It introduces concepts like views and algorithms that operate on ranges, allowing you to chain operations together to process data efficiently and elegantly without relying heavily…
vcpkg
vcpkg is an open-source, cross-platform package manager for C and C++ libraries that simplifies the acquisition and building of dependencies. Supporting Windows, Linux, and macOS, it streamlines the integration of external libraries into your projects through search, installation, and removal commands. It also…
Spack
Spack is a package manager designed for flexibility and support for multiple versions, configurations, platforms, and compilers, making it especially useful in High Performance Computing (HPC) environments. It automates the process of installing and managing dependencies, enabling users to build complex software…
Conan
Conan is a package manager specifically designed for C and C++ projects. It helps developers manage dependencies, build configurations, and share pre-built libraries across different platforms and build systems like CMake and Visual Studio. Using Conan, you can easily declare project dependencies, fetch them from…
NuGet
NuGet is a package manager initially designed for the .NET ecosystem, but it also extends its functionality to C++ projects through the PackageReference format. It simplifies the process of adding, updating, and managing external libraries and dependencies within your C++ projects, whether you're using Visual…
gtest / gmock
Google Test and Google Mock are open-source C++ unit testing frameworks developed by Google. Google Test is a standalone framework for writing and running unit tests, while Google Mock extends it with powerful mocking capabilities. GMock is especially useful for testing components that interact with external or…
Qt
Qt is a cross-platform application development framework widely used for creating graphical user interfaces (GUIs) and applications that run on various operating systems, such as Windows, macOS, Linux, and embedded systems. It provides a set of tools and libraries that simplify the development process, offering…
Catch2
Catch2 is a modern, C++-native, header-only framework for writing unit tests, benchmarks, and even simple command-line applications. It provides a simple and expressive syntax for defining test cases, assertions, and sections, making it easy to write and maintain comprehensive tests for your C++ code. It supports…
Orbit Profiler
Orbit Profiler is a performance analysis tool designed to help developers identify bottlenecks and optimize the performance of their applications. It provides detailed insights into CPU usage, memory allocation, and other performance metrics through sampling and tracing. This helps pinpoint areas where code can be…
PyTorch C++
PyTorch C++ provides a front-end for the PyTorch machine learning framework, allowing you to build and deploy models using C++ instead of Python. This enables you to leverage the performance and control of C++ for computationally intensive tasks, especially in production environments where low latency and resource…
Questions about the C++ Roadmap
Is the C++ Roadmap free?
Yes. All 127 lessons in this roadmap are free to read on Bibha AI Learning Labs, with no account and no payment. Signing in is optional: it lets you mark lessons as done and keep your progress, and it opens the AI tutor, which runs on your own API key.
How long does the C++ Roadmap take?
There is no fixed duration. It has 127 lessons in 20 stages, and the time it takes depends on how many hours you give it each week. Nothing is locked, so you can skip what you already know, and your progress is saved once you sign in.
Where should I start the C++ Roadmap?
Start with stage 1, Introduction to Language, and work down in order. The stages are numbered in the order the roadmap suggests, but every lesson is open, so if you already know Introduction to Language you can go straight to Setting up your Environment or anything after it. Each lesson links to free resources for going deeper.
Can I learn C++ in Hindi?
The lessons are written in English. Once you sign in, you can ask the AI tutor on any lesson to explain it in Hindi or Hinglish. It answers from that lesson’s own text, so the explanation stays on the syllabus. The tutor runs on your own Google, OpenAI or Anthropic key.