The ++ operator doesn't know the difference, the compiler determines the difference based on where the ++ operator is used, such as ++i or i++. And in some cases it won't matter whether its post or prefix. The code inside the operator function should not care one way or the other.
Ancient Dragon
Achieved Level 70
32,109 posts since Aug 2005
Reputation Points: 5,836
Solved Threads: 2,575
Skill Endorsements: 68
In your example ob must be an int. For ob++ the ob int is evaluated first, then when that is done it calls the ++ operator (either the default c++ operator or the one in your program that you wrote).
Ancient Dragon
Achieved Level 70
32,109 posts since Aug 2005
Reputation Points: 5,836
Solved Threads: 2,575
Skill Endorsements: 68