Bruce Eckel's Thinking in C++, 2nd Ed Contents | Prev | Next

22: Multiple inheritance

The basic concept of multiple inheritance (MI) sounds simple enough.

[[[Notes:

  1. Demo of use of MI, using Greenhouse example and different company’s greenhouse controller equipment.
  2. Introduce concept of interfaces; toys and “tuckable” interface
]]]

You create a new type by inheriting from more than one base class. The syntax is exactly what you’d expect, and as long as the inheritance diagrams are simple, MI is simple as well.

However, MI can introduce a number of ambiguities and strange situations, which are covered in this chapter. But first, it helps to get a perspective on the subject.

Contents | Prev | Next


Contact: webmaster@codeguru.com
CodeGuru - the website for developers.
[an error occurred while processing this directive]