O'Reilly logo

SAMS Teach Yourself C++ in 10 Minutes SECOND EDITION by Jesse Liberty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Multiple Inheritance

C++ allows a class to inherit from more than one superclass using a feature called multiple inheritance. Multiple inheritance is a controversial feature that always provokes strong arguments. Many programmers believe that multiple inheritance is not only unnecessary but even dangerous—though there are probably just as many who think it is an essential tool and that it can be used wisely.

Inheritance represents a relationship between classes often called “is a.” For instance, aPersistentTapeExternalInterface is anExternalInterface with additional features.

Aggregation, the use of objects as member variables, as aController uses anAccumulator, represents a relationship between instances called “has” (when the instance owns ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required