O'Reilly logo

C++ Primer Plus by Stephen Prata

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13. Class Inheritance

In this chapter you’ll learn about the following:

• Inheritance as an is-a relationship

• How to publicly derive one class from another

• Protected access

• Constructor member initializer lists

• Upcasting and downcasting

• Virtual member functions

• Early (static) binding and late (dynamic) binding

• Abstract base classes

• Pure virtual functions

• When and how to use public inheritance

One of the main goals of object-oriented programming is to provide reusable code. When you develop a new project, particularly if the project is large, it’s nice to be able to reuse proven code rather than to reinvent it. Employing old code saves time and because it has already been used and tested, can help suppress the introduction of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required