记录详情

Compile Error

foo.c: In function 'Saddle':
foo.c:9:15: error: subscripted value is neither array nor pointer nor vector
    9 |   int max=a[i][0];
      |               ^
foo.c:12:11: error: subscripted value is neither array nor pointer nor vector
   12 |    if(a[i][j]>max)
      |           ^
foo.c:14:13: error: subscripted value is neither array nor pointer nor vector
   14 |     max=a[i][j];
      |             ^
foo.c:19:15: error: subscripted value is neither array nor pointer nor vector
   19 |   int min=a[i][k];
      |               ^
foo.c:22:11: error: subscripted value is neither array nor pointer nor vector
   22 |    if(a[r][k]<min)
      |           ^
foo.c:23:13: error: subscripted value is neither array nor pointer nor vector
   23 |     min=a[r][k];
      |             ^
foo.c:8:7: warning: variable 'k' set but not used [-Wunused-but-set-variable]
    8 |   int k=0;
      |       ^
foo.c: In function 'main':
foo.c:38:13: warning: passing argument 1 of 'Saddle' from incompatible pointer type [-Wincompatible-pointer-types]
   38 |  sum=Saddle(a,m,n);
      |             ^
      |             |
      |             int (*)[9999]
foo.c:3:16: note: expected 'int *' but argument is of type 'int (*)[9999]'
    3 | int Saddle(int a[],int m,int n)
      |            ~~~~^~~
foo.c:34:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   34 |  scanf("%d %d",&m,&n);
      |  ^~~~~~~~~~~~~~~~~~~~
foo.c:37:4: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   37 |    scanf("%d",&a[i][j]);
      |    ^~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
4-5 有几个鞍点
语言
C
递交时间
2022-04-17 18:28:13
评测时间
2022-04-17 18:28:13
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes