Part . Class Design, Inheritance, and Polymorphism

In addition to the generic paradigm, C++ equally supports object-oriented design and programming. This section turns the spotlight on this more traditional area, with particular attention to the way C++ exposes OO features.

To get started, we'll consider a real-world example of code containing a subtle flaw, and we'll use it as a springboard to review basic object construction and teardown ordering. Then it's on to an in-depth foray into the world of writing robust code, which touches on the issue of code security: First, what parts of a class are accessible from various other code and, in particular, what ways are there for “leaking” the private parts of a class, intentionally or otherwise? What ...

Get Exceptional C++ Style 40 New Engineering Puzzles, Programming Problems, and Solutions 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.