foo.cc:11:19: error: 'vector' was not declared in this scope
11 | string shareCandy(vector<int> v)
| ^~~~~~
foo.cc:8:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
7 | #include <cstring>
+++ |+#include <vector>
8 |
foo.cc:11:26: error: expected primary-expression before 'int'
11 | string shareCandy(vector<int> v)
| ^~~
foo.cc:12:1: error: expected ',' or ';' before '{' token
12 | {
| ^
foo.cc: In function 'int main()':
foo.cc:78:5: error: 'vector' was not declared in this scope
78 | vector<int> v(n);
| ^~~~~~
foo.cc:78:5: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
foo.cc:78:12: error: expected primary-expression before 'int'
78 | vector<int> v(n);
| ^~~
foo.cc:81:16: error: 'v' was not declared in this scope
81 | cin >> v[i];
| ^
foo.cc:84:24: error: 'v' was not declared in this scope
84 | cout << shareCandy(v);
| ^
[Hydro](https://hydro.ac)提供评测服务