Hi guys,
In older VS versions I used to be able to do this:
for(int i=0;i<100;i++)
// loop something
for(i=0;i<100;i++)
// loop something
Notice how the 'i' isn't declared in the second loop. I can't do that in VS2012.
Is doing the following bad ?
for(int i=0;i<100;i++)
// loop something
for(int i=0;i<100;i++)
// loop something
for(int i=0;i<100;i++)
// loop something
I have been doing it like this when I have more than one loop:
int i;
for(i=0;i<100;i++)
// loop something
for(i=0;i<100;i++)
// loop something
...but I'd rather declare it in the loop itself.
Thanks.