📄 student_read.c
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -