Skip to main content

Multiple Inheritance

  • Chapter
  • 734 Accesses

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

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   59.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints 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

Publish with us

Policies and ethics