From: "Anthony.Appleyard" Organization: Materials Science Centre To: djgpp AT delorie DOT com Date: Wed, 9 Apr 1997 14:07:51 GMT-1 Subject: Re: funny re user-defined ++ and -- operators Reply-to: Anthony DOT Appleyard AT umist DOT ac DOT uk Message-ID: <7DF09C6867@fs2.mt.umist.ac.uk> Alaric B. Williams wrote:- > operator++(int) is postfix > operator++() is prefix > The ugliest syntax hack ever to see the light of day :-( Chris Croughton replied:- > Not quite, I think, but close. However, it's certainly one of the most > counter-intuitive ones - the first looks prefix, with the parameter after > the operator, and the second looks postfix with the variable obviously > before (as in x.operator++()). It seems clear to me. operator++() is monadic prefix, same as e.g. operator*() is prefix: `++X' operator++(int) is dyadic with a null 2nd arg, e.g. `X ++ ' == `X++'