记录详情

Compile Error

foo.c: In function 'main':
foo.c:6:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
    6 |         scanf("%d",n);
      |                ~^  ~
      |                 |  |
      |                 |  int
      |                 int *
foo.c:13:13: error: redeclaration of 'num' with no linkage
   13 |         int num[0]=1;
      |             ^~~
foo.c:7:13: note: previous declaration of 'num' with type 'int[n]'
    7 |         int num[n];
      |             ^~~
foo.c:13:20: error: invalid initializer
   13 |         int num[0]=1;
      |                    ^
foo.c:14:13: error: conflicting types for 'num'; have 'int[1]'
   14 |         int num[1]=1;
      |             ^~~
foo.c:13:13: note: previous definition of 'num' with type 'int[0]'
   13 |         int num[0]=1;
      |             ^~~
foo.c:14:20: error: invalid initializer
   14 |         int num[1]=1;
      |                    ^
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1024 兔子数列
语言
C
递交时间
2022-08-18 12:43:53
评测时间
2022-08-18 12:43:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes