View Single Post
  #3 (permalink)  
Old January 1st, 2006, 09:13 AM
Jonax Jonax is offline
Friend of Wrox
 
Join Date: Jun 2003
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

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"


Reply With Quote