+ 1

What is the meaning of operator overloading in C++ language?

Please write one simple program to clarify operator overloading concept.

21st Oct 2018, 1:29 PM
kriti bali
kriti bali - avatar
3 Respostas
+ 4
Ok. Overloading is when you have two functions with same name. But different arguments; So if you call a function. The arguments you passed will be avaliated. And finally the right function implementation will be called. Here my code: https://code.sololearn.com/coFh2xSdOSH5
21st Oct 2018, 1:42 PM
Anya
Anya - avatar
0
I think it is the same that just double result damn ... Or multiply or other... Why I would be use operator-overloading instead using just non-overloaded operators? What's it will give me more than non-ovrldng operators? For exam I can get obj1 in a, obj2 in b and then use x=a+b? For why it needs?
21st Oct 2018, 8:30 PM
Игорь Сакуев
Игорь Сакуев - avatar