Skip to main content

Part of the book series: Macmillan Master Series ((PMSC))

  • 245 Accesses

Abstract

This chapter deals with the very important topic of inheritance. Much of the material dealt with so far has been presented in order that you will be able to use and understand inheritance, as it applies to C++. It is therefore important that you are fully conversant with the material covered in the previous chapters. We look first of all at single inheritance, where one class inherits attributes and methods from another (base) class. In our discussion of single inheritance we take a look at the different levels of access provided by the private, protected and public keywords. We examine when name clashes between functions can occur and how to resolve them. In sections 8.3 and 8.7 we look at how classes can be descended from more than one base class and see when multiple inheritance might be required. Sections 8.4 and 8.5 deal with the important topics of virtual functions and abstract classes.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Copyright information

© 1998 W. Arthur Chapman

About this chapter

Cite this chapter

Chapman, W.A. (1998). Inheritance. In: Mastering C++ Programming. Macmillan Master Series. Palgrave, London. https://doi.org/10.1007/978-1-349-14795-3_8

Download citation

  • DOI: https://doi.org/10.1007/978-1-349-14795-3_8

  • Publisher Name: Palgrave, London

  • Print ISBN: 978-0-333-73179-6

  • Online ISBN: 978-1-349-14795-3

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics