结构体的三种定义方法 单独定义: 先定义结构体类型,再定义变量 struct student{ int age; string name; }; struct student s1,s2; 混合定义 定义结构体类型时,同时定义结构变量 struct student{ int age; string name; }s1,s2; 其中,s1,s2是变量 无类型名定义 struct { int age; string name; }s1; 另外附上自己无脑问题: 拓展 点击连接