记录详情

Compile Error

foo.cc: In function ‘int main()’:
foo.cc:8:12: error: ‘make_unique’ was not declared in this scope
    8 |     auto a=make_unique<vector<int>>();
      |            ^~~~~~~~~~~
foo.cc:8:12: note: ‘std::make_unique’ is only available from C++14 onwards
foo.cc:8:34: error: expected primary-expression before ‘>’ token
    8 |     auto a=make_unique<vector<int>>();
      |                                  ^~
foo.cc:8:37: error: expected primary-expression before ‘)’ token
    8 |     auto a=make_unique<vector<int>>();
      |                                     ^
foo.cc:12:34: error: expected primary-expression before ‘>’ token
   12 |     auto b=make_unique<vector<int>>();
      |                                  ^~
foo.cc:12:37: error: expected primary-expression before ‘)’ token
   12 |     auto b=make_unique<vector<int>>();
      |                                     ^
foo.cc:15:34: error: expected primary-expression before ‘>’ token
   15 |     auto c=make_unique<vector<int>>();
      |                                  ^~
foo.cc:15:37: error: expected primary-expression before ‘)’ token
   15 |     auto c=make_unique<vector<int>>();
      |                                     ^
foo.cc:19:14: error: ‘e1’ was not declared in this scope; did you mean ‘y1’?
   19 |     while(p1<e1&&p2<e2){
      |              ^~
      |              y1
foo.cc:19:21: error: ‘e2’ was not declared in this scope
   19 |     while(p1<e1&&p2<e2){
      |                     ^~
foo.cc:22:13: error: ‘e1’ was not declared in this scope; did you mean ‘y1’?
   22 |     for(;p1<e1;++p1) c->push_back(*p1);
      |             ^~
      |             y1
foo.cc:23:13: error: ‘e2’ was not declared in this scope
   23 |     for(;p2<e2;++p2) c->push_back(*p2);
      |             ^~

信息

递交者
类型
自测
题目
P1050 OO11-2 vector<int>中的有序插入
语言
C++
递交时间
2025-05-10 14:00:50
评测时间
2025-05-10 14:00:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes