不知道哪的逻辑出问题了?

#include<stdio.h>
struct happy
{
int year;
int month;
int day;
};
int x(struct happy *q);
int main()
{

struct happy a;
x(&a);

return 0;

}
int x(struct happy *q)
{
printf(" ");
return 0;
}
19 21 D:\谭浩强C作业合集\第九章\第二条.c [Error] unused parameter 'q' [-Werror=unused-parameter]

意思是函数参数q你没有在函数里使用
改为
printf("%d",q->year);就可以了

可以查看手册:c语言-逻辑 中的内容