C++ allows identifiers to be declared in for loops. For instance, consider numsides in line A below. In pre-Standard C++ specifications, the scope of such an identifier continued to the end of the block that the for loop was declared in. Therefore, to be able to interrogate numsides on line B was ok under those rules. #include int main() { const int maxsides = 99; for (int numsides = 0; numsides A if (…SomeCondition…) break; // blah blah } if (numsides != maxsides) // B std::cout However, toward the end of the standardization process, related to some other rules (about conditional declarations in general), the committee decided that the scope of the identifier should only be within the for, therefore, line B is an error accto Standard C++. Note that some compilers have a switch to allow old style code to continue to work. For instance, the transition model switch is –old_for_init under Comeau C++. In order for line B to work under Standard C++ , line A needs to be split