I didn't get it... how can an oerator be overloaded? | SoloLearn: Learn to code for FREE!

0

I didn't get it... how can an oerator be overloaded?

3/15/2016 2:45:00 PM

Praman Kasliwal

1 Answer

New Answer

+3

For example lets say the "+" operator. You can add int objects ( like 2+2, or 10+42) but if you have Person objects , you can't add them because "+" operator was not build to do that. In that case you overload the "+" operator to add your two Person objects .