I'm moving from Borland C to MS one and have to fight with this programmer-hostile product (I mean MS Visual C++ 6.0).
Here is the test program
((int* ) p)++;
The code above compiles fine in C mode, but generates compile error 'Lvalue required' in C++ mode.
I should note that there are no problems with the code above on Borland C at all.
I tried /Ze, /Za switches or no switches at all. I tried IDE with appropriate checkbox checked and unchecked.
So the Q is: how to make VC compile the code above in C++ mode?
Please, do not suggest solutions like
p = ( char * )(( int * )p + 1 );
I will not accept answers like 'It is impossible'.