Introduction to OOP | Chapter 13: Multiple Inheritance: | next | previous | audio | real | text |
class GraphicalCardDeck : public CardDeck, public GraphicalObject { public: virtual void draw () { return CardDeck::draw(); } virtual void paint () { GraphicalObject::draw(); } } GraphicalCardDeck gcd; gcd->draw(); // selects CardDeck draw gcd->paint(); // selects GraphicalObject draw