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)进行评测。