 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
A
base class constructor is always invoked before a
|
|
|
derived
class constructor in an inheritance hierarchy.
|
|
|
| • |
This
means that a derived class' constructor can assume
|
|
|
that
the base class members have been initialized by the
|
|
|
time
it is executed.
|
|
|
| • |
The
body of a derived class constructor is executed last
|
|
|
after
the base class and all indirect base class constructors
|
|
within
the hierarchy have executed.
|
|
|
| • |
But,
when we have a derived class, we are not explicitly
|
|
|
using
the base class' constructor. Instead, the base class’
|
|
|
constructor
is implicitly invoked by the derived class
|
|
|
constructor
that initializes the base class members.
|
|