+ 5

What is the essence of operator overloading?

Operation overloading appears to be a little complicated. Can someone please help tell me it's essence.... Or help make it simple to comprehend.

7th Apr 2018, 2:00 PM
Abraham N. Mulbah
Abraham N. Mulbah - avatar
1 Answer
+ 1
sometimes it can make your code easier to read/write or shorter when you for example create class Fraction, you might like to do frac1+frac2, rather than frac1.add(frac2)
7th Apr 2018, 2:39 PM
michal