ok thanks, one more doubt regarding the same.
The ++ operator is overloaded as shown in the above post. I tried this. And it worked
int j = obj++;
But later i thought of overloading + operator instead of ++ to do the same job. Now the below line gave compiler error.
int j = obj2+;
But this worked after I added another integer after +
int j = obj2+100;
I verified 100 is not going into the overloaded operator function. The function was simply returning a int which could have been assigned to j. It didn't happen. But when another constant is there on the right side it worked. Why is it so?