May 2002
Beginner
320 pages
6h 18m
English
Operator overloading is one of the most overused and misused capabilities of C++. It is your responsibility to make sure that you do not misuse an operator symbol so that another programmer's intuitive understanding of what the operator means is violated. For instance, do not overload + to subtract, or reimplement ! to make a number negative. Also, you should clearly explain what any overloaded operator does by providing a comment where the operator is declared in the header file.
In general, your code is much more readable when you use conventional member functions with meaningful names rather than overloaded operators.
anExternalInterface might be somewhat easier to use if it ...
Read now
Unlock full access