i is out of scope after the end of the first for loop. There was a time
when some compilers would allow i to be in scope after the 1st for loop
had ended but the C++ standard (see section 6.5.3) does not allow this
behaviour any more. You can tell the compiler using /Ze that you want i
to be in scope after the end of the loop. Personally I would change my
code so that it was standard compliant.
--
sashan
http://sashang.orcon.net.nz/index.htm
>i is out of scope after the end of the first for loop. There was a time
> when some compilers would allow i to be in scope after the 1st for loop
[quoted text clipped - 6 lines]
> sashan
> http://sashang.orcon.net.nz/index.htm
In Visual C++ 2005 the option to revert back to the old non-conformant
behavior is:
/Zc:forScope-

Signature
Jonathan Caves
Visual C++ Compiler Team
DR - 03 Sep 2005 04:21 GMT
> In Visual C++ 2005 the option to revert back to the old non-conformant
> behavior is:
>
> /Zc:forScope-
I figured that out.
I'll report a bug:
The /W0 option seams to be ignored by the VC++2005Exp compiler . I still get
warnings.