欢迎来到天天文库
浏览记录
ID:19320292
大小:47.00 KB
页数:11页
时间:2018-10-01
《【最新+免费】学会成绩管理系统源码 c++》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、【最新编排】----------------------------------------------------------------------------------------------------------------------#include#include#include#include//#includeusingnamespacestd;intm;intrenshu=0;FILE*fp;class
2、student{public:student(stringa,stringn,ints,inty,intc){shu=s;ying=y;cf=c;name=a;num=n;}student(){}voidshuru();voidshuchu();voidpaiming();voidfindn();voidfindm();voidadd();voiddel();voidchange();private:intshu,cf,ying,total;stringname,num;};voidstudent::shuru()
3、{studentstud;ofstreamoutfile("stud.dat",ios::out
4、ios::binary);if(!outfile){cerr<<"没有找到文件"<>m,m){cout<<"姓å"<<""<<"å¦å·"<<""<<"C++"<<""<<"æ•°å¦"<<""<<"英è¯"<5、cin>>stud.name>>stud.num>>stud.cf>>stud.shu>>stud.ying;stud.total=stud.cf+stud.shu+stud.ying;renshu++;//outfile.seekg(ios::beg);outfile.write((char*)&stud,sizeof(stud));}cout<<"0.åœæ¢è¾“å…¥?继ç»ï¼Œè¯·è¾“å…¥è¦è¦è¾“入的人数:";}outfile.close();}voidstudent6、::shuchu(){//system("cls");studentstud;ifstreaminfile("stud.dat",ios::in7、ios::binary);if(!infile){cerr<<"没有找到文件"<>m,m)//{cout<<"姓å"<<""<<"å¦å·"<<""<<"C++"<<""<<"æ•°å¦"<<8、""<<"英è¯"<<""<<"总分"<9、‡ºçš„人数:";//}infile.close();system("pause");}voidstudent::findn(){intk;stringkey;studentstud;ifstreaminfile("stud.dat",ios::in10、ios::binary);if(!infile){cerr<<"没有找到文件"<>key;while(!feo11、f(fp)){//infile.seekg(ios::beg);infile.read((char*)&stud,sizeof(stud));if(stud.name==key){cout<<"姓å"<<""<<"å¦å·"<<""<<"C++"<<""<<"æ•°å¦"<<""<<"英è¯"<<""<<"总分"<
5、cin>>stud.name>>stud.num>>stud.cf>>stud.shu>>stud.ying;stud.total=stud.cf+stud.shu+stud.ying;renshu++;//outfile.seekg(ios::beg);outfile.write((char*)&stud,sizeof(stud));}cout<<"0.åœæ¢è¾“å…¥?继ç»ï¼Œè¯·è¾“å…¥è¦è¦è¾“入的人数:";}outfile.close();}voidstudent
6、::shuchu(){//system("cls");studentstud;ifstreaminfile("stud.dat",ios::in
7、ios::binary);if(!infile){cerr<<"没有找到文件"<>m,m)//{cout<<"姓å"<<""<<"å¦å·"<<""<<"C++"<<""<<"æ•°å¦"<<
8、""<<"英è¯"<<""<<"总分"<9、‡ºçš„人数:";//}infile.close();system("pause");}voidstudent::findn(){intk;stringkey;studentstud;ifstreaminfile("stud.dat",ios::in10、ios::binary);if(!infile){cerr<<"没有找到文件"<>key;while(!feo11、f(fp)){//infile.seekg(ios::beg);infile.read((char*)&stud,sizeof(stud));if(stud.name==key){cout<<"姓å"<<""<<"å¦å·"<<""<<"C++"<<""<<"æ•°å¦"<<""<<"英è¯"<<""<<"总分"<
9、‡ºçš„人数:";//}infile.close();system("pause");}voidstudent::findn(){intk;stringkey;studentstud;ifstreaminfile("stud.dat",ios::in
10、ios::binary);if(!infile){cerr<<"没有找到文件"<>key;while(!feo
11、f(fp)){//infile.seekg(ios::beg);infile.read((char*)&stud,sizeof(stud));if(stud.name==key){cout<<"姓å"<<""<<"å¦å·"<<""<<"C++"<<""<<"æ•°å¦"<<""<<"英è¯"<<""<<"总分"<
此文档下载收益归作者所有