全文预览

C++程序设计关于运动会报名系统

上传者:学习一点 |  格式:docx  |  页数:34 |  大小:2177KB

文档介绍
"<<endl;?cout<<"┕█▇▆▅▄▃▂▁▂▃▄▅▆▇█┙"<<endl;?cout<<endl;?cout<<"*******************************"<<endl;?cout<<endl;?cout<<"*****请输入一个数据,并按回车键!*****"<<endl;}classMatch{public:?Match*next;//为创建链表做准备?intnumber;//比赛项目编号?charcall[10];//比赛项目名称?chartime[10];//比赛时间?charplace[20];//比赛地点friend?voidinput1();};voidinput1(){ofstreamfout("e:\\比赛项目.dat",ios::app);?charch;?Matcha;?do?{cout<<"请分别输入比赛项目编号、名称、比赛时间、比赛地点."<<endl;?cin>>a.number>>a.call>>a.place>>a.time;?a.next=NULL;fout.write((char*)&a,sizeof(Match));?cout<<"是否继续输入,如果继续键入Y|y"<<endl;?cin>>ch;?}while(ch=='y'||ch=='Y');fout.close();}Match*head1;voidcreat(){head1=NULL;Match*p,*q=head1;ifstreamfin("e:\\比赛项目.dat",ios::in);if(!fin){cout<<"文件打开失败!"<<endl;exit(0);}p=newMatch;?fin.read((char*)p,sizeof(Match));?while(!fin.eof())?{if(head1==NULL)head1=p;?else

收藏

分享

举报
下载此文档