O'Reilly logo

The C++ Programming Language, Fourth Edition by Bjarne Stroustrup

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

20. Derived Classes

Do not multiply objects without necessity.

– William Occam

Introduction

Derived Classes

Member Functions; Constructors and Destructors

Class Hierarchies

Type Fields; Virtual Functions; Explicit Qualification; Override Control; using Base Members; Return Type Relaxation

Abstract Classes

Access Control

protected Members; Access to Base Classes; using-Declarations and Access Control

Pointers to Members

Pointers to Function Members; Pointers to Data Members; Base and Derived Members

Advice

20.1. Introduction

From Simula, C++ borrowed the ideas of classes and class hierarchies. In addition, it borrowed the design idea that classes should be used to model concepts in the programmer’s and the application’s world. C++ ...

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