C++ is an object-oriented programming language. Like C, it provides finer control of memory and is closer to hardware than many other languages.
Key concepts
- Data types
- Type cast (
static_cast,reinterpret_cast,const_cast,dynamic_cast) - typedef
- struct (
struct) - Templates and containers
- Type cast (
- Qualifiers
- Object-oriented constructs
- Constructor
- Operator overloading
- Access modifier (
public,private,protected) - Stream
- Exception handling
- Functional constructs
- Memory-accesses
- Pointer
- Reference (
&) - Unique pointer (
unique_ptr) - Shared pointer (
shared_ptr)
- Reference (
- Heap allocation (
new,delete)
- Pointer
Over the years
- Constructs over the years
- C++11
- Type inference (
auto) - Standard Template Library
- Constant expressions (
constexpr) - Compile-time assertion (
static_assert) - Lambda functions and closures
- Explicit overrides (
override,final) - nullptr (
nullptr,std::nullptr_t) - Scoped enums (
enum class)
- Type inference (
- C++17
- String views (
std::string_view) - Return value optimisation (RVO) mandated for prvalues
- String views (
- C++20
- C++26
- Static reflection
- Contract assertion (
contract_assert,pre,post)
- C++11
Resources
- Problem Solving with C++, by Walter J. Savitch
- The Definitive C++ Book Guide and List on StackOverflow