记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:8:6: error: conflicting types for 'a'
  int a[10000]={0};
      ^
/in/foo.c:6:11: note: previous declaration of 'a' was here
     int n,a,b,x;
           ^
/in/foo.c:9:6: error: conflicting types for 'b'
  int b[10000]={0};
      ^
/in/foo.c:6:13: note: previous declaration of 'b' was here
     int n,a,b,x;
             ^
/in/foo.c:16:2: error: expected ',' or ';' before 'for'
  for(i=0;i<=n;i++)
  ^~~
/in/foo.c:16:10: error: 'i' undeclared (first use in this function)
  for(i=0;i<=n;i++)
          ^
/in/foo.c:16:10: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:16:18: error: expected ';' before ')' token
  for(i=0;i<=n;i++)
                  ^
/in/foo.c:16:18: error: expected statement before ')' token
/in/foo.c:22:16: error: 'j' undeclared (first use in this function)
    c[i]=a[i]+b[j];
                ^
/in/foo.c:26:2: error: expected ',' or ';' before 'printf'
  printf("%d",);
  ^~~~~~
/in/foo.c:25:5: warning: unused variable 'max' [-Wunused-variable]
 int max=searchmax(c,n)
     ^~~
/in/foo.c:6:15: warning: unused variable 'x' [-Wunused-variable]
     int n,a,b,x;
               ^
/in/foo.c: In function 'searchmax':
/in/foo.c:39:12: error: 'min' undeclared (first use in this function); did you mean 'main'?
   if(a[i]>=min)
            ^~~
            main
/in/foo.c:38:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  for(int i=0;i<=n;i++)
  ^~~
/in/foo.c:41:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   return max;
   ^~~~~~

信息

递交者
类型
递交
题目
偷拍硕哥2
比赛
小兰赛 2018/12/9
语言
C
递交时间
2018-12-09 11:36:52
评测时间
2018-12-09 11:37:10
评测机
分数
0
总耗时
13ms
峰值内存
2.918 MiB