Wednesday, 18 April 2012

What is the main purpose of overloading operators? | C++

The main purpose of operator overloading is to minimize the chances of occurrence of errors in a class that is using the overloaded operators. It also helps in redefining the functionalities of the operators to improve their performance.
Operator overloading also makes the program clearer, readable, and more understandable by using common operators, such as +, =, and [].

No comments: