1 //读写结构体 2 #include <stdio.h> 3 typedef struct student 4 { 5 int num; 6 char name[30]; 7 char sex; 8 float math; 9 float english; 10 float chinese; 11 12 }Stu; 13 14 Stu s[5] = 15 { 16 1001,"wukong",'x',99,99,99, 17 1002,"songjiang",'x',99,22,11, 18 1003,"baoyu",'x',79,33,100, 19 1004,"liudehua",
33. 使用fread()/fwrite()往文件中写入结构体,从文件中读出结构体
最新推荐文章于 2023-12-21 22:14:35 发布