正在加载图片...
3)先定义结构体类型再定义变量名 struct结构体名 成员表列 ; struct结构体名变量名;或结构体名变量名; 例: struct student Ichar num[10l char name 201; char sex: int age; float score 5];3 student stl st2 /声明2个结构体变量 C++程序设计课件设计制作:徐龙琴C++程序设计课件 设计制作:徐龙琴 11 ⑶先定义结构体类型再定义变量名 struct 结构体名 { 成员表列; }; struct 结构体名 变量名; struct student {char num[10]; char name[20]; char sex; int age; float score[5]; } struct student st1,st2; //声明2个结构体变量 例: 或 结构体名 变量名; student st1,st2;
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有