Skip to main content

Inheritance

  • Chapter
  • First Online:
Beginning C++20
  • 3128 Accesses

Abstract

In this chapter, you’ll look at a topic that lies at the heart of object-oriented programming: inheritance. Inheritance is the means by which you can create new classes by reusing and expanding on existing class definitions. Inheritance is also fundamental to making polymorphism possible. We’ll discuss polymorphism in the next chapter, so what you’ll learn there is an integral part of what inheritance is all about. There are subtleties in inheritance that we’ll tease out using code that shows what is happening.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Ivor Horton and Peter Van Weert

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Horton, I., Van Weert, P. (2020). Inheritance. In: Beginning C++20. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-5884-2_14

Download citation

Publish with us

Policies and ethics