Monday, September 3, 2012

Visual Studio 2010 C++ tips: for loop initializer

In Visual Studio 2010, for a loop's initialization variable is not available out of for loop scope, unlike Visual C++ 6.0. Whenever we compile old codes (generated in VC++ 6.0) using newest version, it annoys us. Then, take easy, and change project option to release your blood pressure.

Go to "Project property pages - C/C++ - Language - Force Conformance in For Loop Scope", and select "No (/Zc:forScope-)".

For more information, "http://msdn.microsoft.com/en-us/library/84wcsx8x.aspx".



No comments: