Skip to content

Glossary

A comprehensive reference of C++ terms used throughout this guide.


A class that cannot be instantiated directly because it contains at least one pure virtual function. Serves as a base class defining an interface that derived classes must implement. First appears in Module 04

Keywords (public, private, protected) that control the visibility of class members. Public members are accessible everywhere, private only within the class, protected within the class and derived classes. First appears in Module 00

A unique identifier for a location in memory, typically represented as a hexadecimal number. Pointers store addresses. First appears in Module 01

A class from which other classes inherit. Also called a “parent class” or “superclass.” The base class provides common functionality to its derived classes. First appears in Module 03

An operation that converts a value from one type to another. C++ provides four cast operators: static_cast, dynamic_cast, const_cast, and reinterpret_cast. First appears in Module 06

A user-defined type that encapsulates data (attributes) and functions (methods) that operate on that data. Classes are the foundation of object-oriented programming in C++. First appears in Module 00

The process of converting source code into machine code. In C++, this involves preprocessing, compiling, and linking stages. First appears in Module 00

A keyword that declares a variable, parameter, or member function as constant (immutable). Const-correctness is an important C++ practice. First appears in Module 00

A special member function called automatically when an object is created. Used to initialize object data. Has the same name as the class and no return type. First appears in Module 00

A class that stores a collection of elements. The STL provides containers like vector, list, map, stack, and queue. First appears in Module 08

A constructor that creates a new object as a copy of an existing object. Takes a const reference to an object of the same class. Part of the Orthodox Canonical Form. First appears in Module 02

Copying an object by duplicating all its data, including dynamically allocated memory. Contrast with shallow copy, which only copies pointers. First appears in Module 02

A class that inherits from a base class. Also called a “child class” or “subclass.” Gains access to non-private members of its base class. First appears in Module 03

A special member function called automatically when an object is destroyed. Used to clean up resources. Named with a tilde prefix: ~ClassName(). First appears in Module 00

An ambiguity that arises in multiple inheritance when a class inherits from two classes that share a common base class. Solved with virtual inheritance. First appears in Module 03

The OOP principle of bundling data with the methods that operate on it, and restricting direct access to internal data. Achieved through access specifiers. First appears in Module 00

An event that disrupts normal program flow, typically an error condition. C++ uses try, catch, and throw for exception handling. First appears in Module 05

A file (.hpp or .h) containing declarations of classes, functions, and variables. Included in source files with #include. First appears in Module 00

The region of memory used for dynamic allocation (via new/delete). Objects on the heap persist until explicitly deleted. Contrast with stack. First appears in Module 01

The OOP mechanism where a class (derived) acquires properties and behaviors from another class (base). Establishes an “is-a” relationship. First appears in Module 03

A specific object created from a class. When you use new or declare a variable of a class type, you create an instance. First appears in Module 00

A class with only pure virtual functions, defining a contract that implementing classes must fulfill. By convention, interface names often start with ‘I’. First appears in Module 04

An object that points to an element in a container and can traverse through the container’s elements. Similar to pointers but more generic. First appears in Module 08

The tool that combines compiled object files into an executable. Resolves references between files. First appears in Module 00

A bug where dynamically allocated memory is never freed, causing the program to consume increasing amounts of memory. Prevented by proper use of delete or RAII. First appears in Module 01

A function defined inside a class. Also called a “member function.” Methods can access the class’s private data. First appears in Module 00

A declarative region that provides scope to identifiers inside it. Prevents name collisions. The standard library uses std:: namespace. First appears in Module 00

An instance of a class. Contains data (attributes) and can perform actions (methods). First appears in Module 00

Defining custom behavior for operators (+, -, <<, etc.) when used with user-defined types. Allows natural syntax for class operations. First appears in Module 02

A C++ design pattern requiring classes to implement four special members: default constructor, copy constructor, copy assignment operator, and destructor. First appears in Module 02

Providing a new implementation for a virtual function in a derived class. The derived version is called instead of the base version. First appears in Module 03

A variable that stores a memory address. Declared with *. Can be dereferenced to access the value at that address. First appears in Module 01

The ability to treat objects of different types through a common interface. In C++, achieved through virtual functions and inheritance. First appears in Module 04

A virtual function declared with = 0 that has no implementation in the base class. Makes the class abstract. First appears in Module 04

RAII (Resource Acquisition Is Initialization)

Section titled “RAII (Resource Acquisition Is Initialization)”

A C++ idiom where resources are acquired in constructors and released in destructors. Ensures automatic cleanup even when exceptions occur. First appears in Module 02

An alias for an existing variable. Declared with &. Must be initialized and cannot be reassigned. Safer than pointers for many use cases. First appears in Module 01

The region of code where a variable or identifier is valid. Variables go out of scope when their block ends. First appears in Module 00

Copying an object by copying only its immediate values, including pointer addresses. Can lead to double-delete bugs. Contrast with deep copy. First appears in Module 02

The region of memory used for local variables and function calls. Automatically managed (LIFO). Limited size. Contrast with heap. First appears in Module 01

A keyword with multiple meanings: static member variables are shared across all instances, static member functions can be called without an object, static local variables persist between function calls. First appears in Module 00

A blueprint for creating generic classes or functions that work with any data type. The compiler generates specific versions as needed. First appears in Module 07

A member function declared with virtual that can be overridden in derived classes. Enables runtime polymorphism through dynamic dispatch. First appears in Module 04

A hidden table of function pointers used by the compiler to implement virtual function dispatch. Each class with virtual functions has a vtable. First appears in Module 04


ModuleKey Terms
00Class, Object, Constructor, Destructor, Namespace, const, static
01Pointer, Reference, Stack, Heap, Memory Leak, Address
02OCF, Copy Constructor, Deep Copy, Shallow Copy, Operator Overloading, RAII
03Inheritance, Base Class, Derived Class, Override, Diamond Problem
04Polymorphism, Virtual Function, Abstract Class, Interface, vtable
05Exception
06Cast (static, dynamic, const, reinterpret)
07Template
08-09Container, Iterator