标题非常具有自我描述性.我已经下载了Qt Creator 2.7.0,我正在尝试编译一些基本的C++ 11代码:
int my_array[5] = {1, 2, 3, 4, 5};
for(int &x : my_array)
{
x *= 2;
}
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
range based for loops are not allowed in c++ 98 mode
Run Code Online (Sandbox Code Playgroud)
然而,根据这篇文章,这个版本的Qt Creator支持C++ 11.那么我该如何启用呢?