Home | » | C++ Programming | » | Operator Overloading |
Just like the functions are being overloaded, the operator can also be overloaded in C++. Operator overloading means, given additional meanings to the operators like +,*,<=,+= when dealing with objects of user-define-class or in other words, the operators perform more than their conventional role.
- * / % += -= *= /= %= |
<= > >= == != |
&& || |
| ~ ^ << >> <<= >>= &= = ^+ |
-- |
[] () -> ->* new new[] delete[] delete[] |
The simple example of Operator overloading is given below :
another example :