structstudent*Read();voidsave(structstudent*"> structstudent*Read();voidsave(structstudent*" />
欢迎来到天天文库
浏览记录
ID:47604232
大小:30.78 KB
页数:23页
时间:2019-09-27
《学生综合测评系统方案》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、...#include#include"stdlib.h"#include"string.h"#includestructstudent*Read();voidsave(structstudent*head);voidsinput(structstudent*p);structstudent*input();voidpaixu_num(structstudent*head);structstudent*insert();structstudent*alter();structstudent*del();voidfind_num(structs
2、tudent*phead);voidfind_name(structstudent*phead);voidoutput();voidmin_student(structstudent*phead);voidmax_student(structstudent*phead);voidave_student(structstudent*phead);voidevery_student(structstudent*phead);voidscore_paixu(structstudent*head);voidhelp();voidtj_menu(structstudent*head);void
3、find_menu(structstudent*head);voidmenu();structstudent{//定义学生信息结构数组,用于学生信息输入charnumber[13];charname[13];charsex[4];charadds[15];charphone[14];charqq[14];floatchinese,math,english,txhp,pinde,teacher;intzcmc,ksmc;doubleave,zc;structstudent*next;};#defineLensizeof(structstudent)intlen;//链表长度inta=0
4、,b=0,c=0,d=0,e=0;//用来存放成绩各阶的人数参考学习...charstu[10];structstudent*Read(){//读取数据文件保存到链表中,返回指向此链表头指针structstudent*head=NULL;structstudent*p1,*p2;FILE*fp;cout<<"请输入你要打开的文件(.dat)"<>stu;if((fp=fopen(stu,"rb+"))==NULL){cout<<"打开文件出错!"<5、oc(Len))==NULL){cout<<"内存申请出错"<next=p1;p2=p1;}}fclose(fp);returnhead;}voidsave(structstudent*head){//数据存盘FILE*fp;structstudent*p;p=head;cout<<"请输入你要存进去的文件(.dat)"<>stu;if((fp=fo6、pen(stu,"wb"))==NULL){cout<<"无法打开文件!"<next;}cout<<"数据存入成功!请按任意键继续!"<>p->number;cout<<"请输入姓名:"<7、>p->name;cout<<"请输入性别:"<>p->sex;cout<<"请输入家庭住址:"<>p->adds;cout<<"请输入联系电话:"<>p->phone;cout<<"请输入qq:"<>p->qq;cout<<"请输入语文成绩:"<>p->chinese;if(p->chinese>1008、9、p->chinese<0)参考
5、oc(Len))==NULL){cout<<"内存申请出错"<next=p1;p2=p1;}}fclose(fp);returnhead;}voidsave(structstudent*head){//数据存盘FILE*fp;structstudent*p;p=head;cout<<"请输入你要存进去的文件(.dat)"<>stu;if((fp=fo
6、pen(stu,"wb"))==NULL){cout<<"无法打开文件!"<next;}cout<<"数据存入成功!请按任意键继续!"<>p->number;cout<<"请输入姓名:"<
7、>p->name;cout<<"请输入性别:"<>p->sex;cout<<"请输入家庭住址:"<>p->adds;cout<<"请输入联系电话:"<>p->phone;cout<<"请输入qq:"<>p->qq;cout<<"请输入语文成绩:"<>p->chinese;if(p->chinese>100
8、
9、p->chinese<0)参考
此文档下载收益归作者所有