摘要: 结构体的初始化 语法:struct 结构体名 数组名[数组长度] = {初值列表} 阅读全文
posted @ 2022-06-07 18:09 独舟者 阅读(85) 评论(0) 推荐(0)
摘要: 注意 它不是用来创造类型,而是给已有类型取一个别名 语法 typedef 已有类型 别名; 例: typedef int TYPE TYPE a 等价于 int a 在 typedef 与 结构体 的使用 typedef struct student { int num; int age; }STU 阅读全文
posted @ 2022-06-07 17:46 独舟者 阅读(29) 评论(0) 推荐(0)
摘要: 概念 结构体是一种可以由我们自行定义的数据类型 struct student { int num; int score; float avg; } struct student Tom; //结构体变量 struct student Class[50]; //结构体数组 结构体定义 结构体关键字:s 阅读全文
posted @ 2022-06-07 17:20 独舟者 阅读(72) 评论(0) 推荐(0)