Abstract
As has already been emphasized, inheritance is a natural technique to use when we have a “kind of” relationship; for instance, a cube is a “kind of” solid and a triangle is a “kind of” shape. Sometimes, we would like to construct a derived class with more than one base class. Simple examples abound in the natural world. For instance, if we classify animals into carnivores and herbivores, then we will probably also need an omnivores class, which is derived from both of these, as shown in Figure 13.1.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2001 Springer-Verlag London
About this chapter
Cite this chapter
Capper, D. (2001). Multiple Inheritance. In: Introducing C++ for Scientists, Engineers and Mathematicians. Springer, London. https://doi.org/10.1007/978-1-4471-0267-0_13
Download citation
DOI: https://doi.org/10.1007/978-1-4471-0267-0_13
Publisher Name: Springer, London
Print ISBN: 978-1-85233-488-8
Online ISBN: 978-1-4471-0267-0
eBook Packages: Springer Book Archive