This question has already been answered:
- Operator “+” overload 1 response
I can not figure out with operator overload +. I want to make it possible to add a number to the class object (fraction):
fraction fr(1,5); int x = num; fraction result; result = x + fr;
fraction operator+ (int left_op, fraction right_op) { /* ... */ }- mymedia