Operator Overloading :-
Operator Overloading is a technique to overload an operator with assigning a additional operation to it for example if we want to add two numbers then simply we use the (+) operator but if we want to add two strings objects with (+) operator then we need to overload it.
In C++ the operator overloading is very easy and very efficiently.
We can overload some of the operators not all operators.
Example to overload a binary operator in C++
Operator Overloading is a technique to overload an operator with assigning a additional operation to it for example if we want to add two numbers then simply we use the (+) operator but if we want to add two strings objects with (+) operator then we need to overload it.
In C++ the operator overloading is very easy and very efficiently.
We can overload some of the operators not all operators.
Example to overload a binary operator in C++
{ 0 comments... read them below or add one }
Post a Comment