为什么我选择的是C++11,但是编译报错说不支持C++11?
比方说在P1001提交以下代码:
#include <iostream>
#include <unordered_map>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << a + b << endl;
}
会有编译报错:
In file included from /usr/include/c++/8/unordered_map:35,
from /tmp/compiler_x01yt5oe/src:2:
/usr/include/c++/8/bits/c++0x_warning.h:32:2: 错误:#error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
^~~~~