C++ class functions come in many variations. Some can be inherited, and some can’t. Some operator functions can be either member functions or friends, and others can only be member functions. Table 13.1, based on a similar table from The Annotated C++ Reference Manual, summarizes these properties. In it, the notation
= stands for assignment operators of the form
*=, and so on. Note that the properties for the
= operators are no different from those of the “other operators” category. The reason for listing
= separately is to point out that these operators don’t behave like the
Inheritance enables you to adapt programming code to your particular needs by ...