December 2004
Beginner
936 pages
20h 1m
English
On Day 12, “Implementing Inheritance,” you learned how to write virtual functions in derived classes. This is the fundamental building block of polymorphism: the capability to bind specific, derived class objects to base class pointers at runtime.
Today, you will learn
• What multiple inheritance is and how to use it
• What virtual inheritance is and when to use it
• What abstract classes are and when to use them
• What pure virtual functions are
Suppose you’ve been working with your animal classes for a while, and you’ve divided the class hierarchy into Birds and Mammals. The Bird class includes the member function Fly(). The Mammal class has been divided into a number of types of Mammal ...
Read now
Unlock full access