Contents

Chapter 13 Copy Control

Chapter 14 Overloaded Operations and Conversions

Chapter 15 Object-Oriented Programming

Chapter 16 Templates and Generic Programming

Classes are the central concept in C++. Chapter 7 began our detailed coverage of how classes are defined. That chapter covered topics fundamental to any use of classes: class scope, data hiding, and constructors. It also introduced various important class features: member functions, the implicit this pointer, friends, and const, static, and mutable members. In this part, we’ll extend our coverage of classes by looking at copy control, overloaded operators, inheritance, and templates.

As we’ve seen, in C++ classes define constructors to control what happens when objects of the class ...

Get C++ Primer, Fifth Edition 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.