Functions and variables to which only the class member functions (and
friends) have access.
Functions, and rarely non-constant variables, that are directly accessible
through an object.
The protected keyword behaves the same as the private keyword, with the
exception that protected variables are directly accessible from within
An object is an instance of a class; it is a variable with all the functionality
specified in the class's definition.
A data member is a variable declared in a class definition.
Functions that belong to a class and operate on a its data members.
The constructor of a class is the function that is called automatically when a
new object is created. It should initialize the class's data members and
allocate any necessary memory.
A destructor is the function called when an object goes out of scope. It should
free memory dynamically allocated for the object's data members.
A friend function is a function that has access to all the class's data
members and member functions, including those under the private and protected
Inheritance is the property exhibited when a subclass is derived from a
superclass. In particular it refers to the fact that an instance of the
subclass has all of the data members and member functions of the superclass (and
A base class is a class from which another class, called a derived class,
A derived class is a class which has inherited the components of another class,
called the base class.
A class which has one or more data members (and functions) of some unspecified
data type. By defining a template, the programmer can create an object using
any data type or types.
Composition is the use of an object as a member variable of another class as an
alternative to creating a subclass.
A C++ key word used to qualify functions and inheritance.