+ 2
Can anyone explain operator overloading?
3 odpowiedzi
+ 2
Ever seen x+=x in any language....? That's it
If X is 2 in the context X+=X will be X = X + X, hence X = 2 + 2
+ 1
ok tanqs guyzz..
0
Operator overloading is a type of polymorphism. It means the same operator will have different meaning depending on the operands.
for example, +,-,* or = are treated as polymeric functions depending on the type of their arguments.