洛谷编译器坏掉了?
  • 板块灌水区
  • 楼主searchstar
  • 当前回复3
  • 已保存回复3
  • 发布时间2021/11/25 08:36
  • 上次更新2023/11/3 23:37:09
查看原帖
洛谷编译器坏掉了?
92652
searchstar楼主2021/11/25 08:36

为什么我选择的是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 \
  ^~~~~
2021/11/25 08:36
加载中...