/in/foo.c:6:10: error: unknown type name 'Date'
int days(Date d1, Date d2)
^~~~
/in/foo.c:6:19: error: unknown type name 'Date'
int days(Date d1, Date d2)
^~~~
/in/foo.c: In function 'main':
/in/foo.c:26:2: error: unknown type name 'Date'
Date d1,d2;
^~~~
/in/foo.c:26:2: note: use 'struct' keyword to refer to the type
/in/foo.c:27:23: error: request for member 'y' in something not a structure or union
scanf("%d-%d-%d", &d1.y, &d1.m, &d1.d);
^
/in/foo.c:27:30: error: request for member 'm' in something not a structure or union
scanf("%d-%d-%d", &d1.y, &d1.m, &d1.d);
^
/in/foo.c:27:37: error: request for member 'd' in something not a structure or union
scanf("%d-%d-%d", &d1.y, &d1.m, &d1.d);
^
/in/foo.c:28:23: error: request for member 'y' in something not a structure or union
scanf("%d-%d-%d", &d2.y, &d2.m, &d2.d);
^
/in/foo.c:28:30: error: request for member 'm' in something not a structure or union
scanf("%d-%d-%d", &d2.y, &d2.m, &d2.d);
^
/in/foo.c:28:37: error: request for member 'd' in something not a structure or union
scanf("%d-%d-%d", &d2.y, &d2.m, &d2.d);
^
/in/foo.c:29:21: warning: implicit declaration of function 'days' [-Wimplicit-function-declaration]
printf("%ddays\n", days(d1,d2));
^~~~