记录详情

Compile Error

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)提供评测服务

信息

递交者
类型
自测
题目
P1545 Problem 6C. 分糖果
语言
C++
递交时间
2023-11-14 11:56:41
评测时间
2023-11-14 11:56:41
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes