This chapter formalizes and details some of the concepts introduced earlier in Chapter 6, “Inheritance and Polymorphism.” We explain how constructors, destructors, and copy assignment operators are generated and used by derived classes. We discuss how the keywords
protected can be used for base classes and members. We also provide examples of multiple inheritance.
Each class that contains methods (
virtual functions) has a virtual jump table, or vtable, which is generated as part of the “lightweight” C++ execution environment. The vtable can be implemented in a number of ways, but the simplest implementation (which is often the fastest and most lightweight) ...