O'Reilly logo

C++ Without Fear: A Beginner’s Guide That Makes You Feel Smart by Brian Overland

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

16 Inheritance: What a Legacy

One of the most distinctive features of classes is subclassing, in which one class inherits the members of a previously defined class. This feature is important for several reasons.

The first reason is that subclassing lets you customize existing software. You can take a class someone else has created and add new features of your own. You can also overwrite any and all existing features of the class. Classes are therefore extensible and reusable (and that’s the last you’ll see of annoying buzzwords in this chapter, I promise).

This sounds wonderful… and sometimes it really is, but (for technical reasons I’ll cover in this chapter) things are not always that easy. For one thing, you have to revise all the constructors ...

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