The for loop, syntax
•
Note: Microsoft Visual C++ 6.0 does not use standard
scoping and for loop syntax. MSVC 6 allows you to
initialize variables in the for loop but not declare
them there. This means they have scope outside the
for loop.
•
•
•
You must write:
{
int i;
for ( i = 0; i < 0; i++ )
{
statements…
}
}
Instead of:
for ( int i = 0; i < 0; i++ )
{
statements…
}