|
|
Why operator overloading? | Operator overloading is about use of ordinary operatorsl like + and !=, for non-simple types.
On this page will motivate you for operator overloading. |
Use of operators provides for substantial notational convenience in certain classes |
Illustrates that use of operator notation is much briefer than use of method notation - at
least when we use natural names of the operations. |
How the methods used above can be be implemented as static methods in the MyInt class. |
Read more about motivation for operator overloading in the text book version of this material. |