+ 1
What is the meaning of operator overloading in C++ language?
Please write one simple program to clarify operator overloading concept.
2 ответов
+ 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
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?