结构体、与其他构造类型;;1.1结构体类型的定义;说明:;2.结构体的嵌套定义
成员的数据类型也可以定义为结构类型,这样就形成了结构的嵌套。
方法一:先定义成员的结构类型,再定义主结构类型;structstudent
{
charnum[15];
charname[10];
charsex[2];
structdate
{
intmonth;
intday;
intyear;
}birthday;
charnation[10];
charadd
结构体、与其他构造类型;;1.1结构体类型的定义;说明:;2.结构体的嵌套定义
成员的数据类型也可以定义为结构类型,这样就形成了结构的嵌套。
方法一:先定义成员的结构类型,再定义主结构类型;structstudent
{
charnum[15];
charname[10];
charsex[2];
structdate
{
intmonth;
intday;
intyear;
}birthday;
charnation[10];
charadd
文档评论(0)