C++ Introduction

C++ is a fast, general purpose programming language. It was created by Bjarne Stroustrup at Bell Labs, as an extension of C with classes, and it is one of the most used languages in the world. In the TIOBE index of November 2026, C++ is on the 4th place, and the C and C++ languages together are on the 3rd place of the PYPL index (Google tutorial searches).

What is C++ used for?

  • Games and game engines (Unreal Engine is written in C++).
  • Operating systems, browsers and databases (parts of Windows, Chrome and MySQL).
  • High performance and real time software: finance, trading, robots, embedded devices.
  • Graphics, simulation and machine learning libraries (the fast core of many tools is in C++).

Why learn C++?

  • Speed: C++ is compiled to machine code, and it gives you control of the memory.
  • Both low level and high level: you can write close to the hardware and also use classes, templates and the standard library.
  • Strong base: after C++, other languages like Java, C# and Rust are easier to understand.
  • Many jobs in systems, games and performance work.

C++ standards

C++ is standardized by ISO. A new standard comes about every three years: C++11, C++14, C++17, C++20 and C++23 (the newest published one). A newer one, C++26, is in the approval process. This tutorial uses C++23 and was tested with GCC 16:

Terminal

$ g++ –version | head -1
g++ (GCC) 16.2.0

A first look

#include <iostream>
#include <string>

int main() {
    std::string language = "C++";
    int year = 1985;
    std::cout << "Hello from " << language << "! First commercial release: " << year << '\n';
}
Output

Hello from C++! First commercial release: 1985

What you will learn

  • Install a compiler and run your first program.
  • Variables, types, operators, strings, input and output.
  • Decisions and loops, arrays, vectors and functions.
  • References, pointers and dynamic memory (with smart pointers).
  • Classes, inheritance, polymorphism, operator overloading and templates.
  • The STL (containers and algorithms), lambdas, exceptions and files.
  • Modern C++: move semantics, ranges, std::format, std::print and threads.
Note: All the outputs on this website are from real runs, compiled with g++ -std=c++23 -Wall -Wextra. You can type the same code and compare. Next chapter: C++ History and Versions.

Congratulations! Chapter Finished. Learn more about the similar topics:
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.