Announcements and Reminders
|
RecordingInheritance ReviewInheritance, virtual functions, polymorphism, abstract classes Multiple InheritanceMultiple inheritance permits a class to be derived from two (or more) other classes. In this way the derived classes inherits the members and properties of both (or more) base classes. Example 9-1 – Multiple Inheritance Multiple Inheritance with Virtual Base Classes
Example 9-2 - Multiple
Inheritance with Virtual Base classes Dynamic CastA dynamic_cast is used with inheritance to cast a base class pointer or reference to a derived class pointer or reference. This is called downcasting. In order for this to succeed, the base class must be polymorphic (contains a virtual function). Reference: Upcasting and Downcasting |