9.1 Overview

New classes can be derived from existing classes using a mechanism called “inheritance” (see the discussion beginning on this page). 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
virtualaccess-specifieroptcomplete-class-name
access-specifier
virtualoptcomplete-class-name

access-specifier:
private
protected
public