+ 1
What is operator overloading& where it is use?
5 Réponses
+ 2
Samrat✌️✌️ The concept is the same
Operators are functions that come with the library
a+b can be rewritten as sum(a, b)
So by overloading the 'function' you make it take objects instead of values as arguments then write a different implementation for the function know what I'm sayin?
+ 1
This is defining custom use for operators on objects. Something like that. I mean who cares about the definition, just know how to apply it.
+ 1
Operator overloading allows programmer to redefine the meaning of an operator. So, an overloaded declaration is a declaration that is declared with the same name as a previously declared declaration in the same scope, except that both declarations have different arguments and obviously different implementation.
And when you call an overloaded function or operator, the compiler determines the most appropriate definition to use, by comparing the argument types you have used to call the function or operator with the parameter types specified in the definitions.
+ 1
Yana Titovec that is known as function overloadig 😂😂😂😂😂
+ 1
Moses Odhiambo i dont want defination i only want to understand the concept