记录详情

Compile Error

foo.c: In function 'main':
foo.c:5:20: error: array type has incomplete element type 'int[]'
     void score(int a[][],int n,int m);
                    ^
foo.c:5:20: note: declaration of 'a' as multidimensional array must have bounds for all dimensions except the first
foo.c:8:13: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'float *' [-Wformat=]
     scanf("%d %d",&n,&m);
            ~^     ~~
            %e
foo.c:8:16: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'float *' [-Wformat=]
     scanf("%d %d",&n,&m);
               ~^     ~~
               %e
foo.c:9:11: error: type of formal parameter 1 is incomplete
     score(a[100][20],n,m);
           ^
foo.c: At top level:
foo.c:12:16: error: array type has incomplete element type 'int[]'
 void score(int a[][],int n,int m)
                ^
foo.c:12:16: note: declaration of 'a' as multidimensional array must have bounds for all dimensions except the first
foo.c: In function 'score':
foo.c:25:21: warning: left-hand operand of comma expression has no effect [-Wunused-value]
      for(max=a[h][0],l=0;l<m;l++)
                     ^
foo.c:32:21: warning: left-hand operand of comma expression has no effect [-Wunused-value]
      for(min=a[h][0],l=0;l<m;l++)
                     ^
foo.c: In function 'main':
foo.c:8:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d",&n,&m);
     ^~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1016 作文比赛
语言
C
递交时间
2021-11-16 20:02:33
评测时间
2021-11-16 20:02:33
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes