Skip to main content
Top

1998 | OriginalPaper | Chapter

Inheritance

Author : W. Arthur Chapman, BSc (Hons), BA (Hons), PhD

Published in: Mastering C++ Programming

Publisher: Macmillan Education UK

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

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.

Metadata
Title
Inheritance
Author
W. Arthur Chapman, BSc (Hons), BA (Hons), PhD
Copyright Year
1998
Publisher
Macmillan Education UK
DOI
https://doi.org/10.1007/978-1-349-14795-3_8

Premium Partner