自定义类型(结构体,位段,枚举,联合)总结

结构体 结构体(struct)是由一系列具有相同类型或不同类型的数据构成的数据集合,也叫结构。 结构体的定义方式: struct 结构体名{     结构体所包含的变量或数组 }; 例如: struct Student{      //声明一个结构体类型Student   int num;           char name[20];     char sex;         int age
相关文章
相关标签/搜索