New classes can be derived from existing classes using a mechanism called “inheritance” (see the information beginning in Single Inheritance). Classes that are used for derivation are called “base classes” of a particular derived class. A derived class is declared using the following syntax:
Syntax
base-spec :
: base-list
base-list :
base-specifier
base-list , base-specifier
base-specifier :
complete-class-name
virtual access-specifieropt complete-class-name
access-specifier virtualopt complete-class-name
access-specifier :
private
protected
public