+ 2

How to overload this?

Overload the * operator for class A class A{ int var; A _________*(A &obj){ A res; res.var=this->var*obj.var; return res; } };

4th Aug 2017, 4:58 PM
Vladyslav Sabadakh
Vladyslav Sabadakh - avatar
2 odpowiedzi
+ 16
Put the word "operator".... >.>
4th Aug 2017, 5:03 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 1
omg, thanks, i cant understand all the way((
4th Aug 2017, 5:36 PM
Vladyslav Sabadakh
Vladyslav Sabadakh - avatar