3.
|
Binary operators that are overloaded
|
|
A.
|
should generally be friend functions because this allows more natural use of the operators
|
|
B. |
must be friend function. There is no other way to implement the overload.
|
|
C.
|
should generally be a member function because this provides the best privacy
|
|
D. |
can be either friend or member function. Neither method is better.
|
|
The correct answer is A. Binary operators are often symmetrical in how they treat arguments. Passing both arguments through the function argument list treats them alike.
|