Self-Review Exercises
-
10.1 Fill in the blanks in each of the following:
Suppose
a
andb
are integer variables and we form the suma + b
. Now supposec
andd
are floating-point variables and we form the sumc + d
. The two+
operators here are clearly being used for different purposes. This is an example of .Keyword introduces an overloaded-operator function definition.
To use operators on class objects, they must be overloaded, with the exception of operators , and .
The , and of an operator cannot be changed by overloading the operator.
The operators that cannot be overloaded are , , and
Get C++ How to Program, 10/e 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.