记录详情

Compile Error

foo.c:2:18: error: macro parameters must be comma-separated
 #define leap(int y) ((y)%4==0 && (y)%100!=0 || (y)%400==0)
                  ^
foo.c: In function 'days':
foo.c:12:5: warning: implicit declaration of function 'leap' [-Wimplicit-function-declaration]
 td+=leap(i)?366:365;
     ^~~~
foo.c: In function 'main':
foo.c:23:10: error: expected identifier or '(' before ',' token
 struct d1,d2;
          ^
foo.c:24:20: error: 'd1' undeclared (first use in this function)
 scanf("%d-%d-%d", &d1.y,&d1.m,&d1.d);
                    ^~
foo.c:24:20: note: each undeclared identifier is reported only once for each function it appears in
foo.c:25:20: error: 'd2' undeclared (first use in this function); did you mean 'd1'?
 scanf("%d-%d-%d", &d2.y,&d2.m,&d2.d);
                    ^~
                    d1
正在同步测试数据,请稍后

信息

递交者
类型
递交
题目
15-1 改错题
语言
C
递交时间
2021-01-13 10:30:53
评测时间
2021-01-13 10:30:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes