Thanks Vector, but it doesn't quite solve my problem.
What I want is to overload both the prefix and the postfix versions of a unary operator. And I want to do it on different levels in a class / subclass hierarchy. The code you've shown me only overloads the prefix version and the compiler gives me the warning:
"Warn : unaryoverloadvector.cpp(94,21):Overloaded prefix 'operator --' used as a postfix operator"
|