记录详情

Compile Error

/in/foo.c:3:30: error: parameter 'b' has just a forward declaration
 void cal1(int n1,int a[],int b[];int j)
                              ^
/in/foo.c:3:22: error: parameter 'a' has just a forward declaration
 void cal1(int n1,int a[],int b[];int j)
                      ^
/in/foo.c:3:15: error: parameter 'n1' has just a forward declaration
 void cal1(int n1,int a[],int b[];int j)
               ^~
/in/foo.c: In function 'cal1':
/in/foo.c:4:16: error: 'n1' undeclared (first use in this function)
 {for(int i=1;i<n1;i++)
                ^~
/in/foo.c:4:16: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:5:2: error: 'b' undeclared (first use in this function)
 {b[j]++;
  ^
/in/foo.c:6:4: error: 'a' undeclared (first use in this function)
 if(a[j+i]==1){break;}}
    ^
/in/foo.c: At top level:
/in/foo.c:9:29: error: parameter 'b' has just a forward declaration
 void cal2(int n,int a[],int b[];int j)
                             ^
/in/foo.c:9:21: error: parameter 'a' has just a forward declaration
 void cal2(int n,int a[],int b[];int j)
                     ^
/in/foo.c:9:15: error: parameter 'n' has just a forward declaration
 void cal2(int n,int a[],int b[];int j)
               ^
/in/foo.c: In function 'cal2':
/in/foo.c:10:16: error: 'n' undeclared (first use in this function)
 {for(int i=1;i<n;i++)
                ^
/in/foo.c:11:2: error: 'c' undeclared (first use in this function)
 {c[j]++;
  ^
/in/foo.c:12:4: error: 'a' undeclared (first use in this function)
 if(a[j-i]==1){break;}}
    ^
/in/foo.c: In function 'main':
/in/foo.c:25:30: error: 'j' undeclared (first use in this function)
  else if(a[i]==0){cal1(n,a,b,j);cal2(n,a,c,j);}
                              ^
/in/foo.c:25:19: error: too many arguments to function 'cal1'
  else if(a[i]==0){cal1(n,a,b,j);cal2(n,a,c,j);}
                   ^~~~
/in/foo.c:3:6: note: declared here
 void cal1(int n1,int a[],int b[];int j)
      ^~~~
/in/foo.c:25:33: error: too many arguments to function 'cal2'
  else if(a[i]==0){cal1(n,a,b,j);cal2(n,a,c,j);}
                                 ^~~~
/in/foo.c:9:6: note: declared here
 void cal2(int n,int a[],int b[];int j)
      ^~~~
/in/foo.c:26:15: error: expected ')' before ']' token
  if(b[i]>=c[i]]){max[i]=b[i];}
               ^
/in/foo.c:26:15: error: expected statement before ']' token
/in/foo.c:26:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  if(b[i]>=c[i]]){max[i]=b[i];}
  ^~
/in/foo.c:26:16: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
  if(b[i]>=c[i]]){max[i]=b[i];}
                ^
/in/foo.c:26:16: error: expected statement before ')' token
/in/foo.c:27:2: error: 'else' without a previous 'if'
  else{max[i]=c[i];}}
  ^~~~

信息

递交者
类型
自测
题目
P1482 H. Where Klee Sit
语言
C
递交时间
2023-08-25 12:25:17
评测时间
2023-08-25 12:25:17
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes