Skip to content
UPEEC

C++ Language Fundamentals

Standards, compilation, namespaces, const-correctness, type deduction, initialisation and value categories. C++ vs C and references have their own pages earlier in this subject.

Easy
Comments 0

This is an overview — pick a sub-topic below.

Sub-topics (13)

C++ Overview

A multi-paradigm language created by Bjarne Stroustrup: C's efficiency plus classes, templates and a rich standard library.

Beginner♥ 0🔖 0💬 0

Compilation and Linking in C++

Each `.cpp` file becomes an object file; the linker joins them. Templates and inline functions live in headers.

Easy♥ 0🔖 0💬 0

Namespaces

Group names to avoid clashes.

Beginner♥ 0🔖 0💬 0

Const Correctness

Mark everything that shouldn't change as `const` — variables, parameters, member functions.

Easy♥ 0🔖 0💬 0

Uniform Initialization

Brace initialisation `{}` works for all types and forbids narrowing conversions.

Easy♥ 0🔖 0💬 0

Structured Bindings

Unpack pairs, tuples and structs into named variables (C++17).

Easy♥ 0🔖 0💬 0

Casting in C++

Named casts make intent explicit: `static_cast`, `const_cast`, `reinterpret_cast`, `dynamic_cast`.

Easy♥ 0🔖 0💬 0

Lvalues and Rvalues

Lvalues have identity (a named variable); rvalues are temporaries about to disappear.

Intermediate♥ 0🔖 0💬 0

Value Categories

The full taxonomy: lvalue, prvalue, xvalue (glvalue = lvalue + xvalue; rvalue = prvalue + xvalue).

Advanced♥ 0🔖 0💬 0

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.