student_read.c
来自「c语言版的学生成绩管理系统」· C语言 代码 · 共 19 行
C
19 行
student * read(){ student *head; student *p1,*p2; FILE *file; file=fopen("student_infor","rb"); if(file==NULL) printf("can't open file student_infor\n"); head=p1=p2=(student *)malloc(sizeof(student)); while(file!=NULL){ p1->next=p2; p1=p2; fread(p2,sizeof(student),1,file); p2=(student *)malloc(sizeof(student)); } p1->next=NULL; fclose(file); free(p2);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?