主题:结构体
#include<stdio.h>
struct y_m_d
{
int year;
int month;
int day;
}date;
void main()
{
int days(struct y_m_d datel);
printf("input year,month,day:");
scanf("%d,%d,%d",&date.year,&date.month,&date.day);
printf("%d/%d is the %dth day in %d.\n",date.month,date.day,days(date),date.year);
}为什么编译有错呢?
struct y_m_d
{
int year;
int month;
int day;
}date;
void main()
{
int days(struct y_m_d datel);
printf("input year,month,day:");
scanf("%d,%d,%d",&date.year,&date.month,&date.day);
printf("%d/%d is the %dth day in %d.\n",date.month,date.day,days(date),date.year);
}为什么编译有错呢?