记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:4:5: error: 'vector' was not declared in this scope
     vector<int>b(a,a+5);
     ^~~~~~
foo.cc:4:12: error: expected primary-expression before 'int'
     vector<int>b(a,a+5);
            ^~~
foo.cc:5:12: error: expected primary-expression before 'int'
     vector<int>::iterator p = max_element(b.begin(), b.end());
            ^~~
foo.cc:6:12: error: expected primary-expression before 'int'
     vector<int>::iterator q = min_element(b.begin(), b.end());
            ^~~
foo.cc:7:5: error: 'cout' was not declared in this scope
     cout << *p << endl;
     ^~~~
foo.cc:7:14: error: 'p' was not declared in this scope
     cout << *p << endl;
              ^
foo.cc:7:19: error: 'endl' was not declared in this scope
     cout << *p << endl;
                   ^~~~
foo.cc:7:19: note: suggested alternative: 'enum'
     cout << *p << endl;
                   ^~~~
                   enum
foo.cc:8:14: error: 'q' was not declared in this scope
     cout << *q << endl;
              ^
foo.cc:9:5: error: 'system' was not declared in this scope
     system("pause");
     ^~~~~~
foo.cc:3:9: warning: unused variable 'a' [-Wunused-variable]
     int a[] = { 2, 3, 5, 4, 5 };
         ^
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。

信息

递交者
类型
递交
比赛
2020苏青奥赛集训营(2021-3-7课后作业)
语言
C++
递交时间
2021-03-07 15:38:38
评测时间
2021-03-07 15:38:38
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes