摘要:
#include int main(){ /*************************************************** *结构体数组:数组的每个元素都是结构体类型,注意是同一种结构体类型 * * struct RankRecord * { * int no; * int score; * char *name; * }; * struct RankRecord record[3]; ********************... 阅读全文
posted @ 2014-01-23 11:49
天之涯0204
阅读(270)
评论(0)
推荐(0)
摘要:
#include int main(){ /*************************************************** *定义结构体变量的3种方式 * 1、先定义类型,再定义变量(分开定义) * struct Student * { * int age; * }; * struct Student stu; * 2、 定义类型的同时定义变量(stu) * struct Student ... 阅读全文
posted @ 2014-01-23 11:42
天之涯0204
阅读(451)
评论(0)
推荐(0)
摘要:
#include int main(){ /*************************************************** * * 结构体内存分析(注意结构体里面定义成员结束后要使用分号): * struct Date * { * int year; * int month; * int day; * }; * struct Student * { * int age; * char sex... 阅读全文
posted @ 2014-01-23 11:18
天之涯0204
阅读(2529)
评论(0)
推荐(0)
摘要:
#include int main(){ /*************************************************** * * 数组:由多个相同类型的数据构成 * 结构体:可以由多个不同类型的数据构成 * * 结构体的使用: * 1、定义结构体类型 * struct Person * { * int age; // 年龄 * double height; // 身高 * char *name; ... 阅读全文
posted @ 2014-01-23 10:58
天之涯0204
阅读(164)
评论(0)
推荐(0)
浙公网安备 33010602011771号