记录详情

Compile Error

foo.cc: In function 'int length1(int, int)':
foo.cc:10:8: warning: unused variable 'l1' [-Wunused-variable]
   10 |    int l1=s;
      |        ^~
foo.cc: In function 'int length2(int, int)':
foo.cc:25:8: warning: unused variable 'l2' [-Wunused-variable]
   25 |    int l2=k;
      |        ^~
foo.cc: In function 'int add(int, int, int, int, std::vector<int>&, std::vector<int>&, int, int)':
foo.cc:37:5: error: 'l' was not declared in this scope
   37 |   j[l]=x1%l1;
      |     ^
foo.cc:39:2: error: expected primary-expression before '}' token
   39 |  }
      |  ^
foo.cc:44:1: warning: no return statement in function returning non-void [-Wreturn-type]
   44 | }
      | ^
foo.cc: In function 'int main()':
foo.cc:60:20: error: invalid initialization of reference of type 'std::vector<int>&' from expression of type 'int'
   60 |  add(x1,n1,x2,n2,j,l1,l2);
      |                    ^~
foo.cc:31:65: note: in passing argument 6 of 'int add(int, int, int, int, std::vector<int>&, std::vector<int>&, int, int)'
   31 | int add(int x1,int n1,int x2,int n2,vector<int> &j,vector<int> &k,int l1,int l2)
      |                                                    ~~~~~~~~~~~~~^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
比赛
2022暑期青少年社团(训练赛)
语言
C++
递交时间
2022-08-07 19:05:31
评测时间
2022-08-07 19:05:31
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes