求大神解决问题
struct student input_stu(){char country[20];
char city[20];
char road[20];
int xh;
char name[20];
char grendar[20];
int age;
struct student stu = {0, "Null", "Null", 0,{"Null", "Null", "Null"}};
printf("plz input studnet's xh!\n xh:");
scanf("%d",xh);
stu.xh = xh;
printf("plz input studnet's name!\n Name:");
fgets(name, sizeof(name), stdin);
strcpy(stu.name ,name);
system("clear");
printf("plz input studnet's grender!\n Grender:");
fgets(grendar, sizeof(grendar), stdin);
strcpy(stu.grendar , grendar);
system("clear");
printf("plz input studnet's age!\n Age:");
scanf("%d",age);
stu.age = age;
system("clear");
printf("plz input studnet's country!\n Country:");
fgets(country, sizeof(country), stdin);
strcpy(stu.addr.country , country);
system("clear");
printf("plz input studnet's city!\n City:");
fgets(city, sizeof(city), stdin);
strcpy(stu.addr.city ,city);
system("clear");
printf("plz input studnet's city road\n Road:");
fgets(road, sizeof(road), stdin);
strcpy(stu.addr.road , road);
return stu;
}
我想完成结构体里面参数的赋值,但是一直警告和报错,有大神帮忙解决一下吗?