Chapter 6. Overloading

Many applications are simpler to conceptualize if you realize the compiler can select a function from a group, all of whose functions have the same name. Each function has a different signature, and the compiler performs conversions for argument types when necessary. This concept, called function overloading, provides a standard interface for objects and lets the compiler perform the “dirty work” instead of burdening application programs with these tasks.

Encapsulation and data abstraction are often not enough for application programs to use objects easily and naturally. Users may want to include their objects in expressions with C++ operators, much like they do with built-in data types. Implementation of this concept, ...

Get Navigating C++ and Object-Oriented Design now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.