Chapter 13

1: What does a derived class inherit from a base class?
A1: The public members of the base class become public members of the derived class. The protected members of the base class become protected members of the derived class. The private members of the base class are inherited, but cannot be accessed directly. The answer to review question 2 provides the exceptions to these general rules.
2: What doesn't a derived class inherit from a base class?
A2: The constructor methods are not inherited, the destructor is not inherited, the assignment operator is not inherited, and friends are not inherited.
3: Suppose the return type for the baseDMA::operator=() function were defined as void instead of baseDMA &. What effect, if any, would that ...

Get C++ Primer Plus, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.