Why does this C++ code not compile under VS2010:
for ( int a = 0, short b = 0; a < 10; ++a, ++b ) {} while this one does:
short b = 0; for ( int a = 0; a < 10; ++a, ++b ) {} Is the declaration of two variables of different types inside the for-loop initializer prohibited? If so, how can you work around it?
for ( int a = 0, b = 0; a < 10; ++a, ++b ) {}Hmm. Never noticed that before.