main函数里的第三行,“struct Date ComputerDate(int y,int m);”这句是声明ComputerDate函数,如果你是在main函数里声明的,那ComputerDate函数的代码也应写在main函数里,或者应该把这句写到main函数外面,“void main()”这行前面。
另外,main函数的最后一句(printf那句)里的"d.year"、“d.month”、“d.day”应该写成“d->year”、“d->month”、“d->month”。
ComputerDate的返回值应该是一个指针,所以声明的时候和实现代码的时候应该写成“struct Date *ComputerDate(int y,int m);”和“struct Date *ComputerDate(int y,int m){...}”。