/in/foo.cc:2:18: error: macro parameters must be comma-separated
#define leap(int y) ((y)%4==0 && (y)%100!=0 || (y)%400==0)
^
/in/foo.cc: In function 'int days(d, d)':
/in/foo.cc:12:11: error: 'leap' was not declared in this scope
td+=leap(i)?366:365;
^
/in/foo.cc:14:18: error: 'leap' was not declared in this scope
td-=mon[leap(d1.y)][i];
^
/in/foo.cc:17:18: error: 'leap' was not declared in this scope
td+=mon[leap(d2.y)][i];
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:23:10: error: expected unqualified-id before ',' token
struct d1,d2;
^
/in/foo.cc:23:11: error: aggregate 'main()::d1 d2' has incomplete type and cannot be defined
struct d1,d2;
^~
/in/foo.cc:24:22: error: expected primary-expression before '.' token
scanf("%d-%d-%d", &d1.y,&d1.m,&d1.d);
^
/in/foo.cc:24:28: error: expected primary-expression before '.' token
scanf("%d-%d-%d", &d1.y,&d1.m,&d1.d);
^
/in/foo.cc:24:34: error: expected primary-expression before '.' token
scanf("%d-%d-%d", &d1.y,&d1.m,&d1.d);
^
/in/foo.cc:26:25: error: expected primary-expression before ',' token
printf("%d days",days(d1,d2));
^