O'Reilly logo

The C++ Programming Language, Special Edition by New Jersey Stroustrup Bjarne AT&T Labs Murray Hill

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

Chapter 12. Derived Classes

 

Do not multiply objects without necessity.

 
 --W. Occam

Concepts and classesderived classesmember functionsconstruction and destructionclass hierarchiestype fieldsvirtual functionsabstract classestraditional class hierarchiesabstract classes as interfaceslocalizing object creationabstract classes and class hierarchiesadviceexercises.

Introduction

From Simula, C++ borrowed the concept of a class as a user-defined type and the concept of class hierarchies. In addition, it borrowed the idea for system design that classes should be used to model concepts in the programmer’s and the application’s world. C++ provides language constructs that directly support these design notions. Conversely, ...

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