Chapter 8. Inheritance and Virtual Methods

In the Chapter 7, “Classes,” you learned that encapsulating class data and methods together means that the rest of a program can concentrate on using that class. You learned that by using classes, you can implement abstract data types (ADTs), which present an interface to the classes' clients. You can combine different classes together to build up new classes.

This chapter discusses inheritance, which is another powerful way to build families of related classes (that is, class hierarchies). You use these class hierarchies to model a problem. C++ objects can carry runtime type information (RTTI), which makes true object-oriented programming possible.

In this chapter you will learn

  • How to create new classes ...

Get C++ By Example: UnderC Learning Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.