Ok dang it, you made me vpn in and test it


int main(int argc,char * * argv)
{
// int ;
int i=0;
for(int x=0; x < 10; x++)
{
printf("Loop i: %i %i", i++, x);
}
printf("Loop i: %i %i", i, x);
}

Using g++
test.c: In function `int main(int, char**)':
test.c:13: name lookup of `x' changed for new ISO `for' scoping
test.c:9: using obsolete binding at `x'


I guess it depends on your compiler, but x should be outside the scope of the for loop; however, depending on how the compiler references/dereferences the variable, the value of 10 was probably still out in the same memory address and x wasn't dereferenced and disrupted but other things writing to the same memory, then you would still get x=10 depending on if your compiler lets you do that...

/neb