sorry my mistake. i havent had to use ++ in a while where it mattered in which it was placed (so really only loop increments). and i thought it would be undefined, but when he said you could do that stuff i didnt question it
5 Certain object representations need not represent a value of the object type. If the stored value of an object has such a representation and is read by an lvalue expression that does not have character type, the behavior is undefined. If such a representation is produced by a side effect that modifies all or any part of the object by an lvalue expression that does not have character type, the behavior is undefined.50) Such a representation is called a trap representation.
BHXSpecter, concerning your code, yes I imagine it might not pass compilation on the VC++ compiler, because it likes to initialize variables to values that have semantic meanings that will segment any unproper use, such as this incident. However, if my memory serves my correctly, the gcc compiler on Linux does not bother, so an uninitialized variable has REALL trash value and not initialized by compiler junk which I hate btw in the VC++ compilers