This relationship is reciprocal: if you have three types with similar functionality, you can refactor that similarity out of the three types into a generalized type. At the same time, each of the three types are now specialized forms of the more generalized type.
Inheritance is also implicitly hierarchical: you can imagine a tree with the most generalized type at the top and each level of specialization descending from levels above. A generalized type may have many specializations, but each specialized type may have only one generalization.
class <identifier> : <base class>
Create a virtual method in the base class, and then override it in the derived class.
The more usual meaning is to allocate memory on the heap. The special meaning in inheritance is that you are not overriding a base method; you are creating a new method that intentionally hides and replaces the base class method.
After the parameter list, but before the opening brace,
put a colon followed by the keyword
base and two parentheses. Pass the
parameters for the base class constructor within the
A member of class A is visible to class B if it is marked
public, or if it is marked
and class B derives directly or indirectly
from A. If the member is marked