Chapter 14. Multiple Inheritance

Multiple inheritance allows a class to inherit from more than one base. It is significantly more complicated than single inheritance with respect to syntax, design, and compiler implementation. Multiple inheritance also increases overhead and produces potential ambiguities. Furthermore, designs with multiply-derived classes tend to produce more classes than designs with single inheritance. Even so, multiple inheritance can simplify programs and provide solutions to difficult problems.

This chapter explores multiple inheritance and how to use it in program designs. We have broken the presentation of multiple inheritance into three distinct patterns. Each pattern, or hierarchical structure, has unique characteristics, ...

Get Navigating C++ and Object-Oriented Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.