VOCABULARY
C++ Vocabulary and Key Terms
Section titled “C++ Vocabulary and Key Terms”This document contains essential C++ terminology and concepts that you’ll encounter throughout the guide. Familiarize yourself with these terms to better understand the chapters ahead.
- Abstraction: The process of hiding complex implementation details and showing only the necessary features of an object.
- Algorithm: A generic recipe or step-by-step procedure in the STL for processing container elements (e.g., sort, find, transform).
- Allocation: The process of reserving memory space for objects. See also:
new,malloc. - Argument: A value passed to a function when calling it. Also called “actual parameter”.
- Array: A collection of elements of the same type stored in contiguous memory.
- Base Class: A class from which other classes inherit. Also called “parent class” or “superclass”.
- Binary Operator: An operator that operates on two operands (e.g., +, -, *, /).
- Binding: The process of connecting a function call to its implementation. See also: early binding, late binding.
- Bitwise Operator: Operators that perform operations at the bit level (e.g., &, |, ^, ~, <<, >>).
- Block: A group of statements enclosed in curly braces
{ }. - Boolean: A data type that can hold either
trueorfalse. - Break: A keyword used to exit a loop or switch statement prematurely.
- Buffer: A region of memory used to temporarily store data being transferred.
- C++ Standard: The official specification for the C++ language (C++98, C++03, C++11, C++14, C++17, C++20, C++23).
- Cache: A small, fast memory that stores frequently accessed data for quicker access.
- Cast: Explicitly converting one type to another (e.g.,
static_cast,dynamic_cast). - Class: A user-defined blueprint for creating objects that encapsulates data and functions.
- Compiler: A program that translates source code into machine code or intermediate code.
- Composition: A design technique where a class contains objects of other classes as members.
- Concept: C++20 feature that specifies constraints on template parameters.
- Constructor: A special member function that initializes an object when it’s created.
- Container: An object that stores a collection of elements (e.g., vector, map, set).
- continue: A keyword that skips the rest of the current iteration and moves to the next iteration of a loop.
- Copy Assignment: An operator that assigns values from one object to another existing object.
- Copy Constructor: A constructor that creates a new object as a copy of an existing object.
- Covariant Return Type: A return type in an overridden function that is a derived class of the base class return type.
- Dangling Pointer: A pointer that references memory that has been deallocated.
- Data Member: A variable that belongs to a class. Also called “member variable” or “field”.
- Dead Code: Code that never executes (e.g., after a return statement).
- Declaration: A statement that introduces a name and its type to the program.
- Default Argument: A parameter value used when no argument is provided by the caller.
- Definition: A complete specification of an entity (allocates storage for variables, implements functions).
- Derived Class: A class that inherits from another class. Also called “subclass” or “child class”.
- Destructor: A special member function called when an object is destroyed.
- Diamond Problem: An ambiguity that arises in multiple inheritance when a class inherits from two classes that both inherit from a common base.
- Dynamic Allocation: Memory allocated at runtime using
new. - Dynamic Binding: Runtime resolution of function calls. Also called “late binding” or “polymorphism”.
- Early Binding: Compile-time resolution of function calls. Also called “static binding”.
- Encapsulation: Bundling data and methods that operate on that data within a single unit (class).
- Enum: A user-defined type consisting of named integral constants.
- Exception: An object that represents an error or unusual condition.
- Explicit: A keyword used to mark constructors that cannot be used for implicit conversions.
- FIFO: First In, First Out - a data structure where the first element added is the first to be removed.
- Function: A callable unit of code that performs a specific task.
- Function Overloading: Having multiple functions with the same name but different parameters.
- Function Template: A blueprint for creating functions that work with different types.
- Garbage Collection: Automatic memory management (not native to C++, but available in some environments).
- Getter: A member function that returns the value of a private data member.
- Header File: A file containing declarations that can be included in other source files (
.hor.hpp). - Heap: A region of memory used for dynamic memory allocation.
- Identity Operator: Operators
==and!=that check if two values are equal or not. - Include Guard: Preprocessor directives that prevent a header file from being included multiple times.
- Inheritance: A mechanism where a class derives properties and behaviors from another class.
- Initializer List: A syntax for initializing member variables in a constructor.
- Inline Function: A function whose body is expanded at the call site by the compiler.
- Instance: An object created from a class. Also called “object instance”.
- Instantiation: Creating an object from a class template.
- Interface: A abstract class that defines a contract without implementation.
- L-value: An expression that refers to a specific memory location and can appear on the left side of an assignment.
- Lambda: An anonymous function object that can be defined inline.
- LIFO: Last In, First Out - a data structure where the last element added is the first to be removed (e.g., stack).
- Linker: A tool that combines object files to create an executable.
- Lvalue Reference: A reference to an l-value (e.g.,
int&).
- Macro: A preprocessor directive that defines a constant or a code template.
- Member Function: A function that belongs to a class.
- Memory Leak: Memory that is allocated but never deallocated, causing a gradual loss of available memory.
- Method: Another term for a member function.
- Move Assignment: An operator that transfers resources from one object to another existing object.
- Move Constructor: A constructor that transfers resources from one object to a new object.
- Move Semantics: C++11 feature that allows transferring ownership of resources instead of copying.
- Namespace: A mechanism for organizing names to avoid naming conflicts.
- Nested Class: A class defined within another class.
- new: Operator that allocates memory on the heap and calls the constructor.
- nullptr: C++11 keyword representing a null pointer constant.
- Object: An instance of a class that occupies memory and has state.
- Object File: The compiled output of a source file (
.oor.obj). - Object Slicing: When a derived class object is assigned to a base class object, losing the derived class parts.
- Operator Overloading: Redefining operators to work with user-defined types.
- Overriding: Redefining a virtual function in a derived class.
- PIMPL: Pointer to Implementation - a technique to hide implementation details.
- Parameter: A variable in a function definition that receives a value when the function is called.
- Pass by Reference: Passing a reference to an object rather than a copy.
- Pass by Value: Passing a copy of an object to a function.
- PImpl Idiom: See PIMPL.
- Pointer: A variable that stores the memory address of another variable.
- Polymorphism: The ability of different objects to respond to the same message in different ways.
- Preprocessor: A text processor that runs before compilation.
- Pure Virtual Function: A virtual function with no implementation that must be overridden by derived classes.
- RAII: Resource Acquisition Is Initialization - a programming idiom where resources are acquired in constructors and released in destructors.
- Random Access: The ability to access any element directly without iterating through previous elements.
- Range: A pair of iterators defining a sequence of elements.
- Raw Pointer: A basic pointer without smart pointer wrapper.
- Reference: An alias (alternative name) for another variable.
- Return by Reference: Returning a reference to an object rather than a copy.
- Rvalue: A temporary value that cannot be assigned to (appears on the right side of an assignment).
- Rvalue Reference: A reference to an r-value (e.g.,
int&&).
- Scope: The region of code where a name is visible.
- Setter: A member function that modifies the value of a private data member.
- Shadowing: When a variable in an inner scope has the same name as a variable in an outer scope.
- Signal: A mechanism for inter-process communication.
- Smart Pointer: A class that manages a pointer with automatic memory deallocation.
- Source File: A file containing C++ code (
.cpp,.cc,.cxx). - STL: Standard Template Library - a library of containers, algorithms, and iterators.
- Storage Class: Specifies the lifetime and visibility of a variable (e.g.,
static,extern,auto). - Stream: An abstraction for input/output operations (e.g.,
cin,cout). - String: A sequence of characters.
- Struct: A user-defined type similar to a class, but with public default access.
- Subscription Operator: The
[]operator used for accessing elements (e.g.,array[i]). - Symbol Table: A data structure maintained by the compiler containing information about identifiers.
- Template: A mechanism for creating generic functions and classes.
- Template Argument: A type or value supplied when instantiating a template.
- Template Metaprogramming: Writing programs that manipulate types at compile time.
- This Pointer: A pointer to the current object, automatically passed to member functions.
- Throw: The act of raising an exception.
- Transaction: A sequence of operations that are either all completed or all rolled back.
- Try: A block that contains code that might throw exceptions.
- Unary Operator: An operator that operates on a single operand (e.g., ++, —, !).
- Undefined Behavior: Behavior that is not guaranteed by the C++ standard.
- Union: A special class type where all members share the same memory location.
- Unordered Container: A container that uses hashing for faster lookups (e.g., unordered_map).
- Utility Header:
<utility>header containing helpful functions likestd::move,std::swap.
- Variable: A named storage location in memory.
- Vector: A dynamic array in the STL.
- Virtual Destructor: A destructor in a base class that ensures proper cleanup of derived objects.
- Virtual Function: A function that can be overridden in derived classes and uses dynamic binding.
- Virtual Inheritance: A technique to prevent multiple instances of a base class in multiple inheritance.
- VTable: Virtual Table - a lookup table used for dynamic dispatch of virtual function calls.
- Weak Pointer: A smart pointer that references a shared_ptr without increasing the reference count.
- Wrapper: A class or function that encapsulates another class or function.
Next: 01_fundamentals/01_introduction.md - Introduction to C++
Additional Modern C++ Terms (C++11/14/17/20)
Section titled “Additional Modern C++ Terms (C++11/14/17/20)”- Atomic Operation: An operation that completes as a single indivisible unit without interference from other threads.
- Attribute: A way to add machine-specific or implementation-specific information to C++ code.
- Bidirectional Iterator: An iterator that can move both forward and backward.
- Braced Initialization: Uniform initialization using curly braces
{}.
- constexpr: Keyword indicating expression can be evaluated at compile time.
- consteval: C++20 keyword that forces compile-time evaluation.
- Coroutine: C++20 feature for suspending and resuming execution.
- Copy Elision: Compiler optimization that removes unnecessary copy/move operations.
- CRTP: Curiously Recurring Template Pattern - a compile-time polymorphism technique.
- Decltype: A keyword that deduces the type of an expression at compile time.
- Deduction Guide: C++17 feature helping compiler deduce template arguments from constructor calls.
- Default Member Initializers: C++11 feature allowing member initialization in class definition.
- Fold Expression: C++17 feature that expands parameter packs in binary operations.
- Guard: Include guard or
#pragma onceto prevent multiple header inclusions.
- If constexpr: C++17 statement that discards branches at compile time.
- Inline Variable: C++17 feature allowing inline variables in headers.
- Lambda Expression: An anonymous function object that can capture variables from enclosing scope.
- Memory Model: Defines how the language handles concurrent memory access.
- Module: C++20 feature replacing header files with modular code organization.
- Noexcept: A specification that a function cannot throw exceptions.
- Pack Expansion: Using
...to expand template parameter packs.
- Structured Bindings: C++17 feature allowing decomposition of objects into named variables.
- std::array: Fixed-size container with C-style array semantics.
- std::optional: C++17 container that may or may not contain a value.
- std::variant: C++17 type-safe union.
- std::string_view: C++17 non-owning string reference.
- std::span: C++20 non-owning view into a contiguous sequence.
- Thread: A sequence of instructions that can be executed independently.
- Tuple: A fixed-size collection of heterogeneous elements.
- Uniform Initialization: Initialization syntax using curly braces that works for all types.
- Variadic Template: A template that accepts a variable number of arguments.
Next: 01_fundamentals/01_introduction.md - Introduction to C++