这个结构体套用 怎么报错啊?求解
程序代码:
#include <stdio.h> #include <stdlib.h> struct birthday { int year; int month; int day; } struct student { int studentid; char name[10]; char sex; struct birthday dob; float score; } a={1,"李四",'m',{1993,12,3},95.5}; int main() { printf("学号:%d\n,姓名:%s\n,性别:%c\n,出生日期%d-%d-%d\n,成绩:%f\n",a.studentid,a.name,a.sex,a.dob.year,a.dob.month,a.dob.day,a.score); return 0; }