D Luff wrote:

> Andy Ross writes:
>  
> 
>>But this also hit on a problem that Christian had with MSVC (along
>>with a goodly number of slams, some justified and some not, about my
>>coding style).  I've been living the last few years under the
>>impression that all C++ compilers supported the following construct:
>>
>>for(int i=0; i<n1; i++) { ... }
>>for(int i=0; i<n2; i++) { ... }
>>
>>
> 
> I'm not entirely sure what the problem is.  The following compiles 
> and runs fine for me under MSVC5:
> 
> #include <iostream.h>
> int main()
> {
>       for(int i=0; i<2; i++) {
>           cout << "Hello World " << i << '\n';
>       }
>       return 0;
> }
> 
> as does:
> 
> #include <iostream.h>
> int main()
> {
>     int j = 0;
>     if(j == 0) {
>               for(int i=0; i<2; i++) {
>                 cout << "Hello World " << i << '\n';
>               }
>     }
> 
>     return 0;
> }
> 
> Am I missing something obvious somewhere?

Try adding another loop which initialize i ...

Erik


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to