C++ · Module 1 · Lesson 12 min read

What is C++?

What is C++?

C++ is a general-purpose, compiled, statically typed programming language. It supports several programming styles: procedural (like C), object-oriented (classes) and generic (templates).

A short history

YearMilestone
1979Bjarne Stroustrup starts "C with Classes" at Bell Labs
1983Renamed C++ (++ is the increment operator: "one step beyond C")
1998First ISO standard: C++98
2011C++11: the "modern C++" revolution (auto, lambdas, smart pointers, move semantics)
2014 / 2017C++14, C++17 (structured bindings, optional, filesystem)
2020C++20: concepts, ranges, modules, coroutines, <=>
2023C++23: std::print, std::expected

A new standard arrives about every 3 years.

C vs C++

CC++
Procedural onlyProcedural + OOP + generic
struct holds only dataclass holds data and functions
malloc/freenew/delete, better: smart pointers
printf/scanfstd::cout/std::cin, std::format, std::print
char arrays for textstd::string
Write your own lists/mapsSTL: vector, map, set, algorithms
Error codesExceptions (plus error codes)

Almost all C code is also valid C++, but modern C++ style looks very different.

Where C++ is used

  • Games & engines: Unreal Engine, most console games
  • Browsers: Chrome, Firefox (parts), Edge
  • Finance: high-frequency trading systems
  • Databases: MySQL, MongoDB, ClickHouse
  • Desktop apps: Adobe Photoshop, Microsoft Office (parts)
  • Embedded & robotics, compilers (LLVM), machine-learning engines (TensorFlow, PyTorch cores)

Why learn C++?

  • Performance with high-level abstractions ("zero-cost abstractions")
  • Deep understanding of memory and how computers work
  • Strong demand in games, systems, finance and competitive programming

Key idea: "You don't pay for what you don't use"

C++ features are designed so that if you don't use one, it costs you nothing at runtime.

Example

C++
#include <iostream>
#include <string>
#include <vector>

// A taste of modern C++: a class, a vector and a range-based loop.
class Language {
public:
    std::string name;
    int year;
};

int main() {
    std::vector<Language> family = { {"C", 1972}, {"C++", 1985}, {"Java", 1995}, {"C#", 2000} };

    std::cout << "Languages in the C family:\n";
    for (const Language& lang : family) {
        std::cout << "  " << lang.name << " (" << lang.year << ")\n";
    }
    std::cout << "C++ is " << 2026 - 1985 << " years old in 2026\n";
    return 0;
}

/* Output:
Languages in the C family:
  C (1972)
  C++ (1985)
  Java (1995)
  C# (2000)
C++ is 41 years old in 2026
*/