C++ is a high-performance, statically-typed, compiled language that extends C with object-oriented, generic, and functional programming paradigms. It powers systems software, game engines, high-frequency trading platforms, and performance-critical applications where direct hardware control and zero-cost abstractions are essential. The language evolves on a three-year cycle — C++20 introduced modules, ranges, concepts, and coroutines; C++23 stabilized them and added std::mdspan, std::print, flat containers, and std::generator; C++26 — finalized in March 2026 — ships static reflection, contracts, std::execution (Senders/Receivers async model), and hardened memory safety, making it the most impactful release since C++11. The key mental model: C++ gives you full control at every layer, but demands you understand the cost of every operation.
What This Cheat Sheet Covers
This topic spans 29 focused tables and 402 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Fundamental Data Types
| Type | Example | Description |
|---|---|---|
int x = 42; | • Signed integer, typically 32-bit • most common integer type for general arithmetic. | |
long long n = 9223372036854775807LL; | • Signed integer, at least 64-bit • guaranteed to hold large values across platforms. | |
float f = 3.14f; | • Single-precision 32-bit floating-point • lower precision but faster and smaller than double. | |
double d = 3.14159265359; | • Double-precision 64-bit floating-point • default for decimal literals and most numerical work. | |
bool flag = true; | • Boolean type holding true or false• converts to 1 or 0 in integer contexts. | |
char c = 'A'; | • Single 8-bit character • typically used for ASCII or narrow strings. | |
wchar_t wc = L'Ω'; | • Wide character type, size platform-dependent • used for Unicode on Windows or legacy code. |