Derived Classes with Depth
This is contain Constructors and Destructor, Copy Constructor and Assignment Operator.
thought this is not very hard....but I was really confuse when I using it in the first time....
A derived class that accesses resources has depth through one or more of its instance variables. We know that a class that accesses resources requires explicit definitions of its constructor(s), copy constructor, assignment operator and destructor. Without such definitions, the compiler would insert definitions that only duplicate the instance variables, that do not allocate or deallocate memory for the resources accessed, and that do not duplicate the resources referred to by the resource instance variable(s).
A derived class with depth requires explicit definitions of its own constructor(s), copy constructor, assignment operator and destructor. If we define a constructor and assignment operator for a derived class, we need to call the base class counterparts explicitly. In the absence of a call to the base class constructor, the compiler inserts a call to the no-argument constructor. However, the compiler does not insert any call to the base class assignment operator. Note also that the compiler always inserts a call to the base class destructor from the derived class destructor.