NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Warning (level 1) C4288

nonstandard extension used : 'var' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope

When compiling with /Ze, a variable declared in a for loop was used after the for-loop scope. A Microsoft extension to the C++ language allows this variable to remain in scope, and C4288 reminds you that the first declaration of the variable is not used.

The following sample generates C4288:

void main() {
   int i = 0;   // not used in this program
   for (int i = 0 ; ; ){}
   i++;   // C4288, using for-loop declaration of i
}

See also

The for Statement