Compilation error with “for each” loop in C++ VS2010

后端 未结 6 865
无人及你
无人及你 2021-01-21 10:29

I was working on a little C++ project at home, which I brought into school to show my teacher. At home I have Visual Studio 2012, whereas the school computers have Visual Studio

6条回答
  •  天命终不由人
    2021-01-21 10:42

    MS VC++ 2010 was released before the C++ 2011 Standard was adopted. So it does not support the range-based for statement. On the other hand MS VC++ 2010 has MS language extension for-each-in that was introduced in managed C++ to support foreach statement of C#.

提交回复
热议问题