Original Post
the problem is that this piece of code compiles under msvc++ 6.0, but it shouldnt:
for(int i=0;i<10;i++)
{
//do stuff
}
for(i=0;i<10;i++)
{
//do other stuff
}
if i remember well, according to ANSI c++ standard the variable i cannot be used outside the for loop. but if i use
for(int i=0;i<10;i++)
{}
for(int i=0;i<10;i++)
{}
i get this compiler error:
error C2374: ''i'' : redefinition; multiple initialization
is this a msvc++ fault? anyone getting the same error?