本文为大家分享了C++实现校园运动会报名系统的具体代码,供大家参考,具体内容如下
main.cpp
#include "Campus.h"
#include "List.h"
int main()
{
ShowPage();
return 0;
}
Campush.h
#ifndef CAMPUS_H #define CAMPUS_H #include "List.h" void ShowPage(); void MenuChoose(); // 主菜单 void Apply_System();// 报名系统 void Show_Apply_System(); // 报名系统页面 void Apply_Information_Query();// 信息查询 void show_in_AdSYstem();// 管理员展示页面 void Administrator_System();// 管理员系统; void Athlete_Information(); // 运动员信息查询 void Sport_item_sign(); // 运动项目报名 void printList_new(Message &M); // 打印带有项目的信息 bool Judge_IF_sign(char *) ; // 判断学生是否报名项目 void Point_base_Me(char *Temp); // 打印运动员信息 void AD_Menu(); // 管理员系统菜单 void Manage_system();// 管理员系统 void Log_Administrator(); void AD_Menu2(); void Cancel_signup(); void Revise_Data(); void Enter_Adsystem(); // 管理员登录 bool Judge_IF_Past_due();// 判断是否逾期; extern void Go_back1(); // 返回第一页 extern void Go_back2(); // 返回第二页; extern void Go_back3(); extern void Go_back4(); #endif // CAMPUS_H
List.cpp
#include "List.h" #include "Campus.h" #include#include #include #include #include using namespace std ; void Gettime_f(int &year ,int &month ,int &day ,int &hours ,int &minutes ,int &second ) { time_t now ; struct tm *tm_now ; time(&now) ; tm_now = localtime(&now) ; year = tm_now->tm_year+1900 ; month = tm_now->tm_mon+1 ; day = tm_now->tm_mday ; hours = tm_now->tm_hour ; minutes = tm_now->tm_min ; second = tm_now->tm_sec ; return ; } Status List::CreatList(linkList &L,int n) { // 创建链表; int i ; time_t now ; struct tm *tm_now ; time(&now) ; tm_now = localtime(&now) ; linkList p ; linkList head =NULL ; linkList Last ; for(i=0 ; i > p->data.name ; cout< >p->data.IDcard ; cout< > p->data.gender; cout< > p->data.age ; cout< > p->data.Institute ; cout< > p->data.Class; cout< next = NULL ; Gettime_f(p->data.Join_time.year ,p->data.Join_time.month ,p->data.Join_time.day ,p->data.Join_time.hours ,p->data.Join_time.minutes ,p->data.Join_time.second) ; if(head == NULL) head = p ; else { Last->next = p ; } Last = p ; } L = head ; FILE_Memory(L); cout<< " 信息录用成功"<< endl; return OK ; } Status List::GetElem(linkList &L,int i ,Message &e) { linkList p ; if(!L) { cout<<" GetElem failed"< =i) break ; ++k; p = p->next ; } if(!p || k>i) { cout<<"没找到"< data ; return OK ; } Status List::printList(linkList &L ) { linkList p = L ; while(p) { cout<<"姓名 : " < data.name < data.IDcard < data.gender< data.age< data.Institute< data.Class< data.Join_time.year<<"-"< data.Join_time.month<<"-"<< p->data.Join_time.day <<" "< data.Join_time.hours<<":"< data.Join_time.minutes<<":"< data.Join_time.second< next ; } return OK; } void FILE_Memory(linkList &L) { FILE *fin ; int res ; char m[MAX] ; char n[MAX] ; char Name[MAX] ; linkList p = L; if(L==NULL) { cout<<"L is NULL "<


