亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

C++實(shí)現(xiàn)學(xué)校運(yùn)動(dòng)會(huì)管理系統(tǒng)

 更新時(shí)間:2020年04月08日 10:06:48   作者:自動(dòng)2121馬飛躍  
這篇文章主要為大家詳細(xì)介紹了C++實(shí)現(xiàn)學(xué)校運(yùn)動(dòng)會(huì)管理系統(tǒng),文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

本文實(shí)例為大家分享了C++實(shí)現(xiàn)學(xué)校運(yùn)動(dòng)會(huì)管理系統(tǒng)的具體代碼,供大家參考,具體內(nèi)容如下

#include<iostream>
#include<fstream>
#include<string>
using namespace std;
void fun1()
{ cout<<"******************************"<<endl;
 cout<<endl; 
 cout<<"******學(xué)校運(yùn)動(dòng)會(huì)管理系統(tǒng)******"<<endl;
 cout<<"----數(shù)據(jù)錄入  請(qǐng)按:1----"<<endl;
 cout<<"----數(shù)據(jù)修改  請(qǐng)按:2----"<<endl;
 cout<<"----數(shù)據(jù)刪除  請(qǐng)按:3----"<<endl;
 cout<<"----數(shù)據(jù)查詢  請(qǐng)按:4----"<<endl;
 cout<<"----數(shù)據(jù)顯示  請(qǐng)按:5----"<<endl;
 cout<<"----退出系統(tǒng)  請(qǐng)按:6----"<<endl;
 cout<<endl;
 cout<<"*******************************"<<endl;
 cout<<endl;
 cout<<"*****請(qǐng)輸入一個(gè)數(shù)據(jù),并按回車鍵!*****"<<endl;
}
class Match
{
public:
 Match *next;//為創(chuàng)建鏈表做準(zhǔn)備
 int number; //比賽項(xiàng)目編號(hào)
 char call[10]; //比賽項(xiàng)目名稱
 char time[10];   //比賽時(shí)間
 char place[20]; //比賽地點(diǎn)
 friend void input1();
};
void input1()
{ ofstream fout("e:\\比賽項(xiàng)目.dat",ios::app);
 char ch;
 Match a;
 do
 { cout<<"請(qǐng)分別輸入比賽項(xiàng)目編號(hào)、名稱、比賽時(shí)間、比賽地點(diǎn)."<<endl;
 cin>>a.number>>a.call>>a.place>>a.time;
 a.next=NULL;
  fout.write((char *)&a,sizeof(Match));
 cout<<"是否繼續(xù)輸入,如果繼續(xù)鍵入Y|y"<<endl;
 cin>>ch;
 }while(ch=='y'||ch=='Y');
 fout.close();
}
Match *head1;
void creat()
{ head1=NULL;
 Match *p,*q=head1;
 ifstream fin("e:\\比賽項(xiàng)目.dat",ios::in);
 if(!fin)
 { cout<<"文件打開(kāi)失敗!"<<endl; exit(0);
 }
  p=new Match;
 fin.read((char*)p,sizeof(Match));
 while(!fin.eof()) 
 { if(head1==NULL) head1=p;
  else 
 q->next=p;
 q=p;
  p=new Match;
  fin.read((char*)p,sizeof(Match));
 }
 fin.close();
}
int change1()   //對(duì)比賽項(xiàng)目相關(guān)信息修改
{
 cout<<"您正在進(jìn)行修改比賽項(xiàng)目有關(guān)事項(xiàng)操作!"<<endl; 
 creat();
 Match *p1;
 p1=head1;
 cout<<"請(qǐng)輸入要修改比賽項(xiàng)目的編號(hào):"<<endl;
 int number1;  //要修改的比賽項(xiàng)目編號(hào)
 int sign=0;  //設(shè)置的標(biāo)記變量
 cin>>number1;
 while(p1!=NULL)
 { if(p1->number==number1) {sign=1;break;}
   p1= p1->next;
 }
 if (sign==0)
 cout<<"沒(méi)有找到要修改的記錄!"<<endl;
 else
 {
 cout<<"請(qǐng)選擇要修改比賽項(xiàng)目的那些信息"<<endl;
 cout<<"------修改比賽項(xiàng)目的編號(hào)----1"<<endl;
 cout<<"------修改比賽項(xiàng)目的名稱----2"<<endl;
 cout<<"------修改比賽時(shí)間----3"<<endl;
 cout<<"------修改比賽地點(diǎn)----4"<<endl;
 cout<<"請(qǐng)輸入對(duì)應(yīng)信息的編號(hào)"<<endl;
 int a;
 int nu;   //新的整形數(shù)據(jù)
 char info[20];   //新的字符數(shù)組
 cin>>a;
 switch(a)
 {
 case 1:cout<<"請(qǐng)輸入新的比賽編號(hào):"<<endl;
  cin>>nu;
  p1->number=nu; 
  cout<<"比賽項(xiàng)目編號(hào)修改成功!"<<endl; 
    break;
  case 2:cout<<"請(qǐng)輸入新的比賽項(xiàng)目名稱:"<<endl;
 cin>>info;
   strcpy(p1->call,info);
 cout<<"比賽項(xiàng)目名稱修改成功!"<<endl; 
   break;
  case 3:cout<<"請(qǐng)輸入新的比賽時(shí)間:"<<endl;
 cin>>info;
 strcpy(p1->time,info);
 cout<<"比賽項(xiàng)目時(shí)間修改成功!"<<endl; 
   break;
  case 4:cout<<"請(qǐng)輸入新的比賽地點(diǎn):"<<endl;
 cin>>info;
 strcpy(p1->place,info);
 cout<<"比賽項(xiàng)目地點(diǎn)修改成功!"<<endl; 
  break;
 }
 ofstream fout("e:\\比賽項(xiàng)目.dat",ios::out);
 p1=head1;
  while(p1!=NULL)
 { 
   fout.write((char*)p1,sizeof(Match));
 p1=p1->next;
 } 
  fout.close();
 } 
return 0;
}
int delete1()      //對(duì)比賽項(xiàng)目相關(guān)信息進(jìn)行刪除
{ creat();
 Match *p1,*p2;
 p2=p1=head1;
 cout<<"請(qǐng)選擇要?jiǎng)h除比賽項(xiàng)目的那些信息"<<endl;
 cout<<"------刪除比賽項(xiàng)目的編號(hào)----1"<<endl;
 cout<<"------刪除比賽項(xiàng)目的名稱----2"<<endl;
  cout<<"請(qǐng)輸入對(duì)應(yīng)信息的編號(hào)"<<endl;
  int n;
 cin>>n;
 int num,flag=0;
 char cal[10];
 switch(n)
 {case 1: cin>>num;
    while(p1!=NULL)
 { if(p1->number==num) {flag=1;break;}
    p2=p1;
    p1= p1->next;
 }
    if (flag==0)
    cout<<"沒(méi)有找到要?jiǎng)h除的記錄!"<<endl;
    else
    p2->next=p1->next;
 case 2: cin>>cal;
    while(p1!=NULL)
 { if(!strcmp(p1->call,cal)) {flag=1;break;}
    p2=p1;
    p1= p1->next;
 }
    if (flag==0)
    cout<<"沒(méi)有找到要?jiǎng)h除的記錄!"<<endl;
    else
    p2->next=p1->next;
 }
 ofstream fout("e:\\比賽項(xiàng)目.dat",ios::out);
 p1=head1;
 while(p1!=NULL)
 { 
  fout.write((char*)p1,sizeof(Match));
 p1=p1->next;
 } 
 
 fout.close();
 return 0;
}
void print1()
{
 creat();
 Match *p1=head1;
 cout<<"請(qǐng)分別輸出比賽項(xiàng)目編號(hào)、名稱、比賽時(shí)間、比賽地點(diǎn)."<<endl;
 while(p1!=NULL)
 { cout<<p1->number<<'\t'<<p1->call<<'\t'<<p1->time<<'\t'<<p1->place<<endl;
  
 p1=p1->next;
 } 
}
void find1()
{ creat();
 Match *p1;
 p1=head1;
 int sign=0;//設(shè)置的標(biāo)記變量
  cout<<"請(qǐng)選擇要查詢比賽項(xiàng)目的哪些信息"<<endl;
 cout<<"------按比賽項(xiàng)目的編號(hào)查詢----1"<<endl;
 cout<<"------按比賽項(xiàng)目的名稱查詢----2"<<endl;
 cout<<"------按比賽時(shí)間查詢----3"<<endl;
 cout<<"------按比賽地點(diǎn)查詢----4"<<endl;
 cout<<"請(qǐng)輸入對(duì)應(yīng)信息的編號(hào)"<<endl;
 int a;
 int nu;      //查詢整形數(shù)據(jù)條件
 char info[20];    //查詢字符型數(shù)據(jù)條件
 cin>>a;
 switch(a)
 {
 case 1:cout<<"請(qǐng)輸入要查詢的比賽編號(hào):"<<endl;
  cin>>nu;
  while(p1!=NULL)
  { if(p1->number==nu) {sign=1;break;}
     p1= p1->next;
  }
    if (sign==0)
   cout<<"沒(méi)有找到要查詢的記錄!"<<endl; 
  else
    cout<<p1->number<<'\t'<<p1->call<<'\t'<<p1->time<<'\t'<<p1->place<<endl;
    break;
  case 2:cout<<"請(qǐng)輸入要查詢的比賽項(xiàng)目名稱:"<<endl;
 cin>>info;
   while(p1!=NULL)
  { if(p1->call==info) {sign=1;break;}
     p1= p1->next;
  }
    if (sign==0)
   cout<<"沒(méi)有找到要查詢的記錄!"<<endl; 
  else
    cout<<p1->number<<'\t'<<p1->call<<'\t'<<p1->time<<'\t'<<p1->place<<endl;    break;
  case 3:cout<<"請(qǐng)輸入要查詢的比賽時(shí)間:"<<endl;
 cin>>info;
 while(p1!=NULL)
  { if(!strcmp(p1->time,info)) {sign=1;break;}
     p1= p1->next;
  }
    if (sign==0)
   cout<<"沒(méi)有找到要查詢的記錄!"<<endl; 
  else
    cout<<p1->number<<'\t'<<p1->call<<'\t'<<p1->time<<'\t'<<p1->place<<endl;   break;
  case 4:cout<<"請(qǐng)輸入要查詢的比賽地點(diǎn):"<<endl;
 cin>>info;
 while(p1!=NULL)
  { if(!strcmp(p1->place,info)) {sign=1;break;}
     p1= p1->next;
  }
    if (sign==0)
   cout<<"沒(méi)有找到要查詢的記錄!"<<endl; 
  else
    cout<<p1->number<<'\t'<<p1->call<<'\t'<<p1->time<<'\t'<<p1->place<<endl;  break;
 }
}
class Athlete
{
public:
 Athlete *next;
 int number;   //運(yùn)動(dòng)員的編號(hào)
 char name[10];  //運(yùn)動(dòng)員的姓名
 char part[20];  //運(yùn)動(dòng)員所屬工作單位或省份
 char sex[20];   //運(yùn)動(dòng)員性別
 int age;    //運(yùn)動(dòng)員年齡
 friend void input2();
};
void input2()
{ ofstream fout("e:\\運(yùn)動(dòng)員.dat",ios::app);
 char ch;
 Athlete b;
 do
 { cout<<"請(qǐng)分別輸入運(yùn)動(dòng)員編號(hào)、姓名、性別、年齡、所屬省份或工作單位."<<endl;
 cin>>b.number>>b.name>>b.sex>>b.age>>b.part;
 b.next=NULL;
  fout.write((char *)&b,sizeof(Athlete));
  cout<<"是否繼續(xù)輸入,如果繼續(xù)鍵入Y|y"<<endl;
 cin>>ch;
 }while(ch=='y'||ch=='Y');
}
Athlete *head4;
void creat2()
{ head4=NULL;
 Athlete *p,*q=head4;
ifstream fin("e:\\運(yùn)動(dòng)員.dat",ios::in);
 if(!fin)
 {
 cout<<"文件打開(kāi)失敗!"<<endl; exit(0);
 }
 p=new Athlete;
 fin.read((char*)p,sizeof(Athlete));
 while(!fin.eof()) 
 { if(head4==NULL) head4=p;
  else 
 q->next=p;
 q=p;
  p=new Athlete;
  fin.read((char*)p,sizeof(Athlete));
 }
 fin.close();
}
int change2()   //對(duì)運(yùn)動(dòng)員相關(guān)信息修改
{
 cout<<"您正在進(jìn)行修改運(yùn)動(dòng)員基本信息操作!"<<endl; 
 creat2();
 Athlete *p1;
 p1=head4;
 cout<<"請(qǐng)輸入要修改運(yùn)動(dòng)員的編號(hào):"<<endl;
 int number1;  //要修改的運(yùn)動(dòng)員編號(hào)
 int sign=0;  //設(shè)置的標(biāo)記變量
 cin>>number1;
 while(p1!=NULL)
 { if(p1->number==number1) {sign=1;break;}
   p1= p1->next;
 }
  if (sign==0)
 cout<<"沒(méi)有找到要修改的記錄!"<<endl;
 else
 {
 cout<<"請(qǐng)選擇要修改運(yùn)動(dòng)員的哪些信息"<<endl;
 cout<<"------修改運(yùn)動(dòng)員的編號(hào)----1"<<endl;
 cout<<"------修改運(yùn)動(dòng)員的姓名----2"<<endl;
 cout<<"------修改運(yùn)動(dòng)員所屬工作單位或省份----3"<<endl;
 cout<<"------修改運(yùn)動(dòng)員性別----4"<<endl;
  cout<<"------修改運(yùn)動(dòng)員年齡----4"<<endl;
 cout<<"請(qǐng)輸入對(duì)應(yīng)信息的編號(hào)"<<endl;
 int a;
 int nu;    //新的整形數(shù)據(jù)
 char info[20];   //新的字符數(shù)組
  cin>>a;
 switch(a)
 {
 case 1:cout<<"請(qǐng)輸入新的運(yùn)動(dòng)員編號(hào):"<<endl;
  cin>>nu;
  p1->number=nu; 
  cout<<"運(yùn)動(dòng)員的編號(hào)修改成功!"<<endl; 
    break;
  case 2:cout<<"請(qǐng)輸入新的運(yùn)動(dòng)員姓名:"<<endl;
 cin>>info;
   strcpy(p1->name,info);
  cout<<"運(yùn)動(dòng)員姓名修改成功!"<<endl; 
   break;
case 3:cout<<"請(qǐng)輸入新的運(yùn)動(dòng)員所屬工作單位或省份:"<<endl;
 cin>>info;
 strcpy(p1->part,info);
 cout<<"運(yùn)動(dòng)員所屬工作單位或省份修改成功!"<<endl; 
   break;
case 4:cout<<"請(qǐng)輸入新的性別:"<<endl;
 cin>>info;
 strcpy(p1->sex,info);
 cout<<"運(yùn)動(dòng)員性別修改成功!"<<endl; 
  break;
case 5:cout<<"請(qǐng)輸入新的年齡:"<<endl;
 cin>>nu;
 p1->age=nu,
 cout<<"運(yùn)動(dòng)員年齡修改成功!"<<endl; 
  break;
 }
 ofstream fout("e:\\運(yùn)動(dòng)員.dat",ios::out);
 p1=head4;
  while(p1!=NULL)
 { 
   fout.write((char*)p1,sizeof(Athlete));
 p1=p1->next;
 } 
fout.close();
 } 
 return 0;
}
int delete2()//對(duì)運(yùn)動(dòng)員相關(guān)信息進(jìn)行刪除
{ creat2();
 Athlete *p1,*p2;
 p2=p1=head4;
 cout<<"請(qǐng)選擇要?jiǎng)h除運(yùn)動(dòng)員的哪些信息"<<endl;
 cout<<"------刪除運(yùn)動(dòng)員的編號(hào)----1"<<endl;
 cout<<"------刪除運(yùn)動(dòng)員的姓名----2"<<endl;
  cout<<"請(qǐng)輸入對(duì)應(yīng)信息的編號(hào)"<<endl;
  int n;
 cin>>n;
  int num,flag=0;
 char na[10];
 switch(n)
 {case 1: cin>>num;
    while(p1!=NULL)
 { if(p1->number==num) {flag=1;break;}
    p2=p1;
    p1= p1->next;
 }
    if (flag==0)
    cout<<"沒(méi)有找到要?jiǎng)h除的記錄!"<<endl;
    else
    p2->next=p1->next;
 case 2: cin>>na;
    while(p1!=NULL)
 { if(!strcmp(p1->name,na)) {flag=1;break;}
    p2=p1;
    p1= p1->next;
 }
    if (flag==0)
    cout<<"沒(méi)有找到要?jiǎng)h除的記錄!"<<endl;
    else
    p2->next=p1->next;
 }
 ofstream fout("e:\\運(yùn)動(dòng)員.dat",ios::out);
 p1=head4;
 while(p1!=NULL)
 { 
  fout.write((char*)p1,sizeof(Athlete));
 p1=p1->next;
 } 
fout.close();
 return 0;
}
void find2()
{ creat2();
 Athlete *p1;
 p1=head4;
 int sign=0;//設(shè)置的標(biāo)記變量
  cout<<"請(qǐng)選擇要查詢運(yùn)動(dòng)員的哪些信息"<<endl;
 cout<<"------按運(yùn)動(dòng)員的編號(hào)查詢----1"<<endl;
 cout<<"------按運(yùn)動(dòng)員的姓名查詢----2"<<endl;
 cout<<"請(qǐng)輸入對(duì)應(yīng)信息的編號(hào)"<<endl;
 int a;
 int nu;      //查詢整形數(shù)據(jù)條件
 char info[20];    //查詢字符型數(shù)據(jù)條件
 cin>>a;
 switch(a)
 {
 case 1:cout<<"請(qǐng)輸入要查詢的運(yùn)動(dòng)員編號(hào):"<<endl;
  cin>>nu;
  while(p1!=NULL)
  { if(p1->number==nu) {sign=1;break;}
     p1= p1->next;
  }
    if (sign==0)
   cout<<"沒(méi)有找到要查詢的記錄!"<<endl; 
  else
 cout<<p1->number<<'\t'<<p1->name<<'\t'<<p1->part<<'\t'<<p1->sex<<'\t'<<p1->age<<endl;
    break;
 case 2:cout<<"請(qǐng)輸入要查詢的運(yùn)動(dòng)員姓名:"<<endl;
 cin>>info;
   while(p1!=NULL)
  { if(p1->name==info) {sign=1;break;}
     p1= p1->next;
  }
    if (sign==0)
   cout<<"沒(méi)有找到要查詢的記錄!"<<endl; 
  else
   cout<<p1->number<<'\t'<<p1->name<<'\t'<<p1->part<<'\t'<<p1->sex<<'\t'<<p1->age<<endl; 
   break;
 }
}
void print2()
{
  creat2();
 Athlete *p1=head4;
 cout<<"請(qǐng)分別輸出運(yùn)動(dòng)員編號(hào)、姓名、所屬省份或工作單位、性別、年齡."<<endl;
 while(p1!=NULL)
 { cout<<p1->number<<'\t'<<p1->name<<'\t'<<p1->part<<'\t'<<p1->sex<<'\t'<<p1->age<<endl;
 p1=p1->next;
 } 
}
class Message
{
public:
 Message *next;
 char name[10];  //運(yùn)動(dòng)員姓名
 char avent[10];  //運(yùn)動(dòng)員參加的某比賽項(xiàng)目名稱
 int score ;   //成績(jī)
 int ca;    //名次
 friend void input3();
};
void input3()
{ ofstream fout("e:\\比賽賽事.dat",ios::app);
 char ch;
 Message c;
 do
 { cout<<"請(qǐng)分別輸入?yún)①愡\(yùn)動(dòng)員姓名、比賽名稱、比賽成績(jī)、比賽名次."<<endl;
 cin>>c.name>>c.avent>>c.score>>c.ca;
 c.next=NULL;
  fout.write((char *)&c,sizeof(Message));
 cout<<"是否繼續(xù)輸入,如果繼續(xù)鍵入Y|y"<<endl;
 cin>>ch;
 }while(ch=='y'||ch=='Y');
fout.close();
}
Message *head7;
void creat3()
{ head7=NULL;
 Message *p,*q=head7;
ifstream fin("e:\\比賽賽事.dat",ios::in);
 if(!fin)
 {
 cout<<"文件打開(kāi)失敗!"<<endl; exit(0);
 }
 p=new Message;
 fin.read((char*)p,sizeof(Message));
 while(!fin.eof()) 
 { if(head7==NULL) head7=p;
  else 
 q->next=p;
 q=p;
  p=new Message;
  fin.read((char*)p,sizeof(Message));
 }
 fin.close();
}
int change3() //修改比賽賽事信息
{ cout<<"您正在進(jìn)行修改比賽賽事有關(guān)事項(xiàng)操作!"<<endl; 
 creat3();
 Message *p1;
 p1=head7;
 cout<<"請(qǐng)輸入?yún)①愡\(yùn)動(dòng)員姓名及參賽項(xiàng)目名稱! "<<endl;
 char na[20];
 char info[20];
 int sign=0;//設(shè)置的標(biāo)記變量
 cin>>na>>info;
 while(p1!=NULL)
 { if((p1->name==na)&&(p1->avent==info)) {sign=1;break;}
   p1= p1->next;
 }
  if (sign==0)
 cout<<"沒(méi)有找到要修改的記錄!"<<endl;
  else
 {
 cout<<"請(qǐng)選擇要修改比賽賽事的哪些信息"<<endl;
 cout<<"------修改參賽運(yùn)動(dòng)員的姓名----1"<<endl;
 cout<<"------修改比賽項(xiàng)目的名稱----2"<<endl;
 cout<<"------修改比賽成績(jī)----3"<<endl;
 cout<<"------修改比賽名次----4"<<endl;
 cout<<"請(qǐng)輸入對(duì)應(yīng)信息的編號(hào)"<<endl;
 int a;
 int nu;    //新的整形數(shù)據(jù)
 char info[20];   //新的字符數(shù)組
  cin>>a;
 switch(a)
 {
 case 1:cout<<"請(qǐng)輸入新的參賽運(yùn)動(dòng)員姓名:"<<endl;
  cin>>info;
  strcpy(p1->name,info); 
  cout<<"參賽運(yùn)動(dòng)員姓名修改成功!"<<endl; 
    break;
case 2:cout<<"請(qǐng)輸入新的比賽項(xiàng)目名稱:"<<endl;
 cin>>info;
   strcpy(p1->avent,info);
  cout<<"比賽項(xiàng)目名稱修改成功!"<<endl; 
   break;
case 3:cout<<"請(qǐng)輸入新的比賽成績(jī):"<<endl;
 cin>>nu;
 p1->score=nu;
 cout<<"比賽項(xiàng)目成績(jī)修改成功!"<<endl; 
   break;
case 4:cout<<"請(qǐng)輸入新的比賽名次:"<<endl;
 cin>>nu;
 p1->ca=nu;
 cout<<"比賽名次修改成功!"<<endl; 
  break;
 }
 ofstream fout("e:\\比賽賽事.dat",ios::out);
 p1=head7;
  while(p1!=NULL)
 { 
   fout.write((char*)p1,sizeof(Message));
 p1=p1->next;
 } 
 fout.close();
 } 
 return 0;
}
int delete3()      //對(duì)比賽賽事相關(guān)信息進(jìn)行刪除
{ creat3();
 Message *p1,*p2;
 p2=p1=head7;
 cout<<"請(qǐng)輸入要?jiǎng)h除的參賽運(yùn)動(dòng)員姓名及比賽項(xiàng)目名稱:"<<endl;
 int flag=0;
 char na[20];
 char info[20];
 cin>>na>>info;
    while(p1!=NULL)
 { if((p1->name==na)&&(p1->avent==info)) {flag=1;break;}
    p2=p1;
    p1= p1->next;
 }
    if (flag==0)
    cout<<"沒(méi)有找到要?jiǎng)h除的記錄!"<<endl;
    else
    p2->next=p1->next;
 ofstream fout("e:\\比賽賽事.dat",ios::out);
 p1=head7;
 while(p1!=NULL)
 { 
  fout.write((char*)p1,sizeof(Message));
 p1=p1->next;
 } 
fout.close();
 return 0;
}
void print3()
{
 creat3();
 Message *p1=head7;
 cout<<"請(qǐng)分別輸出比賽參賽運(yùn)動(dòng)員姓名、比賽項(xiàng)目名稱、比賽成績(jī)、比賽名次."<<endl;
 while(p1!=NULL)
 { cout<<p1->name<<'\t'<<p1->avent<<'\t'<<p1->score<<'\t'<<p1->ca<<endl;
  p1=p1->next;
 } 
}
void find3()
{ creat3();
 Message *p1;
p1=head7;
int sign=0;   //設(shè)置的標(biāo)記變量
 cout<<"請(qǐng)輸入要查詢的參賽運(yùn)動(dòng)員姓名和比賽項(xiàng)目名稱! "<<endl;   
 char na[20];
 char info[20];  //查詢字符型數(shù)據(jù)條件
 cin>>na>>info;
 while(p1!=NULL)
  { if((p1->name==na)&&(p1->avent==info)) {sign=1;break;}
     p1= p1->next;
  }
    if (sign==0)
   cout<<"沒(méi)有找到要查詢的記錄!"<<endl; 
  else
    cout<<p1->name<<'\t'<<p1->avent<<'\t'<<p1->score<<'\t'<<p1->ca<<endl;
 }
int find()//進(jìn)行查找
{
 cout<<endl;
 cout<<"\t\t\t請(qǐng)輸入要查詢的信息:"<<endl;
 cout<<"\t\t比賽項(xiàng)目信息查詢  請(qǐng)按:1"<<endl;
 cout<<"\t\t運(yùn)動(dòng)員信息查詢  請(qǐng)按:2"<<endl;
 cout<<"\t\t比賽賽事信息查詢  請(qǐng)按:3"<<endl;
 int j;
 cin>>j;
 switch(j)
 {
 case 1:find1();break;
 case 2:find2();break;
 case 3:find3();break;
 default:cout<<"輸入數(shù)據(jù)有誤!"<<endl;
 }
 return 0;
}
int input()
{
 cout<<endl;
 cout<<"\t\t\t請(qǐng)輸入要輸入的信息:"<<endl;
 cout<<"\t\t比賽項(xiàng)目信息輸入  請(qǐng)按:1"<<endl;
 cout<<"\t\t運(yùn)動(dòng)員信息輸入  請(qǐng)按:2"<<endl;
 cout<<"\t\t比賽賽事信息輸入  請(qǐng)按:3"<<endl;
 int j;
 cin>>j;
 switch(j)
 {
 case 1:input1();break;
 case 2:input2();break;
 case 3:input3();break;
 default:cout<<"輸入數(shù)據(jù)有誤!"<<endl;
 }
 return 0;
}
int print()
{
 cout<<endl;
 cout<<"\t\t\t請(qǐng)輸入要顯示輸出的信息:"<<endl;
 cout<<"\t\t比賽項(xiàng)目信息顯示輸出  請(qǐng)按:1"<<endl;
 cout<<"\t\t運(yùn)動(dòng)員信息顯示輸出  請(qǐng)按:2"<<endl;
 cout<<"\t\t比賽賽事信息顯示輸出  請(qǐng)按:3"<<endl;
 int j;
 cin>>j;
 switch(j)
 {
 case 1:print1();break;
 case 2:print2();break;
 case 3:print3();break;
 default:cout<<"輸入數(shù)據(jù)有誤!"<<endl;
 }
 return 0;
}
int change()
{
 cout<<endl;
 cout<<"\t\t\t請(qǐng)輸入要修改的信息:"<<endl;
 cout<<"\t\t比賽項(xiàng)目信息修改  請(qǐng)按:1"<<endl;
 cout<<"\t\t運(yùn)動(dòng)員信息修改  請(qǐng)按:2"<<endl;
 cout<<"\t\t比賽賽事信息修改  請(qǐng)按:3"<<endl;
 int j;
 cin>>j;
 switch(j)
 {
 case 1:change1();break;
 case 2:change2();break;
 case 3:change3();break;
 default:cout<<"輸入數(shù)據(jù)有誤!"<<endl;
 }
 return 0;
}
int deleted()
{
 cout<<endl;
 cout<<"\t\t\t請(qǐng)輸入要?jiǎng)h除的信息:"<<endl;
 cout<<"\t\t比賽項(xiàng)目信息刪除  請(qǐng)按:1"<<endl;
 cout<<"\t\t運(yùn)動(dòng)員信息刪除  請(qǐng)按:2"<<endl;
 cout<<"\t\t比賽賽事信息刪除  請(qǐng)按:3"<<endl;
 int j;
 cin>>j;
 switch(j)
 {
 case 1:delete1();break;
 case 2:delete2();break;
 case 3:delete3();break;
 default:cout<<"輸入數(shù)據(jù)有誤!"<<endl;
 }
 return 0;
}
int main()
{ 
 int i;
 do
 {
 fun1();
cin>>i; 
 switch(i)
 {
 case 1:input();break;
 case 2:change();break;
 case 3:deleted();break;
 case 4:find();break;
 case 5: print();break;
 case 6: return 0;
 default:cout<<"您輸入數(shù)據(jù)有誤!"<<endl;
 }
 }while(1);
return 0;
}

推薦幾篇文章:

C++實(shí)現(xiàn)簡(jiǎn)單的圖書(shū)管理系統(tǒng)

C++實(shí)現(xiàn)簡(jiǎn)單的職工信息管理系統(tǒng)

C++基礎(chǔ)學(xué)生管理系統(tǒng)

關(guān)于管理系統(tǒng)的更多內(nèi)容請(qǐng)點(diǎn)擊《管理系統(tǒng)專題》進(jìn)行學(xué)習(xí)

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • C語(yǔ)言實(shí)現(xiàn)棧及棧的詳解

    C語(yǔ)言實(shí)現(xiàn)棧及棧的詳解

    這篇文章主要介紹了C語(yǔ)言實(shí)現(xiàn)棧及棧的詳解,一種特殊的線性表,其只允許在固定的一端進(jìn)行插入和刪除元素操作,進(jìn)行數(shù)據(jù)插入和刪除操作的一端稱為棧頂,另一端稱為棧底,需要的朋友可以參考下
    2023-07-07
  • QT實(shí)現(xiàn)自定義Http客戶端的示例代碼

    QT實(shí)現(xiàn)自定義Http客戶端的示例代碼

    這篇文章主要為大家詳細(xì)介紹了QT如何實(shí)現(xiàn)自定義Http客戶端的,可以實(shí)現(xiàn)支持get,post請(qǐng)求方式;支持連接超時(shí)處理;支持網(wǎng)絡(luò)錯(cuò)誤,嘗試重連等功能,感興趣的小伙伴可以學(xué)習(xí)一下
    2022-11-11
  • opencv2基于SURF特征提取實(shí)現(xiàn)兩張圖像拼接融合

    opencv2基于SURF特征提取實(shí)現(xiàn)兩張圖像拼接融合

    這篇文章主要為大家詳細(xì)介紹了opencv2基于SURF特征提取實(shí)現(xiàn)兩張圖像拼接融合,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2020-03-03
  • Cocos2d-x UI開(kāi)發(fā)之文本類使用實(shí)例

    Cocos2d-x UI開(kāi)發(fā)之文本類使用實(shí)例

    這篇文章主要介紹了Cocos2d-x學(xué)習(xí)筆記之文本類,文本類是UI開(kāi)發(fā)中經(jīng)常使用的,本文用詳細(xì)的代碼注釋講解了文本類的使用,需要的朋友可以參考下
    2014-09-09
  • OpenCV基于距離變換和分水嶺實(shí)現(xiàn)圖像分割

    OpenCV基于距離變換和分水嶺實(shí)現(xiàn)圖像分割

    圖像分割是根據(jù)灰度、顏色、紋理和形狀等特征,把圖像分成若干個(gè)特定的、具有獨(dú)特性質(zhì)的區(qū)域。本文將基于距離變換和分水嶺實(shí)現(xiàn)圖像分割,需要的可以了解一下
    2022-09-09
  • 詳解C++11中的右值引用與移動(dòng)語(yǔ)義

    詳解C++11中的右值引用與移動(dòng)語(yǔ)義

    本篇文章主要介紹了詳解C++11中的右值引用與移動(dòng)語(yǔ)義,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2017-02-02
  • C++指針和數(shù)組:字符和字符串、字符數(shù)組的關(guān)聯(lián)和區(qū)別

    C++指針和數(shù)組:字符和字符串、字符數(shù)組的關(guān)聯(lián)和區(qū)別

    字符串是一種重要的數(shù)據(jù)類型,但是c語(yǔ)言并沒(méi)有顯示的字符串?dāng)?shù)據(jù)類型,因?yàn)樽址宰址A康男问匠霈F(xiàn)或者存儲(chǔ)于字符數(shù)組中。在C++標(biāo)準(zhǔn)模板庫(kù)(STL)中提供了string類,實(shí)現(xiàn)了對(duì)字符串的封裝。
    2022-12-12
  • C++中的STL常用算法之遍歷算法詳解

    C++中的STL常用算法之遍歷算法詳解

    這篇文章主要介紹了C++中的STL常用算法之遍歷算法詳解,ransform() 可以將函數(shù)應(yīng)用到容器的元素上,并將這個(gè)函數(shù)返回的值保存到另一個(gè)容器中,它返回的迭代器指向輸出容器所保存的最后一個(gè)元素的下一個(gè)位置,需要的朋友可以參考下
    2023-12-12
  • C/C++模擬實(shí)現(xiàn)煙花效果的示例代碼

    C/C++模擬實(shí)現(xiàn)煙花效果的示例代碼

    這篇文章主要為大家詳細(xì)介紹了C/C++模擬實(shí)現(xiàn)煙花效果的兩種簡(jiǎn)單方法,文中的示例代碼講解詳細(xì),具有一定的借鑒價(jià)值,感興趣的小伙伴可以了解下
    2024-01-01
  • c++命名對(duì)象和匿名對(duì)象的解析

    c++命名對(duì)象和匿名對(duì)象的解析

    像按值傳遞的對(duì)象(函數(shù)入?yún)?,函?shù)返回值)都是匿名對(duì)象,那匿名對(duì)象的特點(diǎn)是什么呢?下面通過(guò)實(shí)例代碼給大家解析c++命名對(duì)象和匿名對(duì)象的相關(guān)知識(shí),感興趣的朋友一起看看吧
    2021-10-10

最新評(píng)論