The problem doesn't lie in the value held by the pre/postfix operator, but the point in code where the side effect of the variable being changed takes place. So when you access again y to read its value before the next sequence point you don't know if y has already been in/decremented or not.Farqaleet wrote:Following is what MSDN says
By this the increment is done before y is used anywhere in the expression. That's what microsoft says. but then again you can't say anthing otherwise without checking other docs eg. Borland, gcc, g++ etc."In the prefix form, the increment or decrement takes place before the value is used in expression evaluation..."
Ciao!!!
Claudio