Help Me/Question Which Type Of Operators Can Be Overloaded?

Doominic anderson

White Belt
In C++ one of the object oriented concept is overloading,it's one of the important technique used by programmers to use one operator on different different values.
Which type of operators can be overloaded in C++ and what are the important points should keep in mind while using overloading concept?

steve taylor

White Belt
We can overload Operator as well as Function in C++.
C++ allows to specify more than one definition of a function name or an operator in the same scope of the program, which is called as function overloading and operator overloading respectively.Function and Operator overloading describe the use of polymorphism in C++ programming.


White Belt
Operators overloaded are like function with the special name, operator keyword, Some symbols are predefined for the operator overloaded.
There are so many types of operators can be overloaded in C++. Such as:-
Binary operators overloading
Relational operators overloading
Subscripting [] operator overloading
Input/Output operators overloading
Class member access operator -> overloading
Assignment operators overloading
Function call () operator overloading.


White Belt
With the help of operator overloading we can achieve polymorphism in Object Oriented Programming language. Polymorphism means by using single function we can achieve different task.
Example -
If we have a function for drawing shape -
Then with the help of shape function we can draw circle, triangle, square by using function overloading.

Swati Mishra

Content Writer
operator overloading is the use in the Polymorphism. Arithmetic operator used on operator overloading that is addition, subtraction, multiplication, etc.

niranjan kumar

White Belt
In c++ operator overloading is most usually concept. When we are learning c++ after taken few classes, our teachers tech me after few class. They clearly tell me about operator overload.
There are few operator overloads.
Binary operators
Subscripting operator
Relational operators