C++ Bites: Glossary

keywords and terms

Generated with ChatGPT 4o
Term Definition
Abstract ClassA class containing at least one pure virtual function. Cannot be instantiated directly.
ClassA user-defined type that encapsulates data and functions. Supports inheritance and polymorphism.
ConstructorA special class method automatically called when an object is created. Initializes the object.
Copy ConstructorCreates a new object as a copy of an existing one. Signature: ClassName(const ClassName&).
DestructorA special method automatically called when an object goes out of scope. Used to release resources.
EncapsulationCombining data and methods into a single unit (class) and restricting access using access specifiers.
FriendAllows external functions or classes to access private or protected members of another class.
Function OverloadingDefining multiple functions with the same name but different parameter types or counts.
Header FileA file (typically .h or .hpp) containing declarations of functions, classes, etc.
HeapMemory region for dynamically allocated objects (via new and delete).
InheritanceMechanism where a class (derived) inherits members from another class (base).
Inline FunctionA function suggested to be expanded in-place by the compiler to reduce function call overhead.
LambdaAn anonymous function defined using [] syntax, often used in STL algorithms.
NamespaceA way to group related code and avoid name collisions.
ObjectAn instance of a class, representing a data structure with behavior.
Operator OverloadingDefining custom behavior for operators (e.g., +, <<) for user-defined types.
PointerA variable that stores the address of another variable or object.
PolymorphismThe ability of objects to behave differently based on their dynamic type (usually via virtual functions).
RAIIResource Acquisition Is Initialization – a technique where resources are tied to object lifetime.
ReferenceAn alias for another variable, declared using &.
Smart PointerClasses like std::unique_ptr or std::shared_ptr that manage object lifetime automatically.
StackMemory region for local variables with automatic lifetime and fast allocation/deallocation.
STL (Standard Template Library)A collection of generic containers, algorithms, and iterators.
TemplateA feature allowing generic programming by defining functions or classes with type parameters.
Virtual FunctionA member function that can be overridden in derived classes, enabling dynamic dispatch.