记录详情

Compile Error

foo.c: In function 'main':
foo.c:5:15: warning: missing braces around initializer [-Wmissing-braces]
   int a[2][3]={1,2,3,4,5,6},n;
               ^
                {    }{    }
foo.c:9:22: warning: passing argument 1 of 'add' from incompatible pointer type [-Wincompatible-pointer-types]
     printf("%d ",add(a+n));
                      ^
foo.c:6:7: note: expected 'int *' but argument is of type 'int (*)[3]'
   int add(int *p);               //?
       ^~~
foo.c: In function 'add':
foo.c:18:10: error: invalid type argument of unary '*' (have 'int')
     sum+=*(*p+i);     //?
          ^~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1029 比比谁更小
语言
C
递交时间
2021-11-29 16:33:40
评测时间
2021-11-29 16:33:40
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes