This document contains code for a sports club management system with the following key features:
1. It defines a Club class to control overall functions like member registration, fee payment, searching, etc.
2. Functions include inputting member details, displaying main menu options for listing members, facility details, fee statements, and ex-member information.
3. Menu options allow registering new members, modifying member info, deleting records, searching by member code, and listing members by activity or all members.
4. Fee functions provide date-wise collection reports and lists of members with outstanding fees.
5. The program manages member codes, names, addresses, contact details, activity codes, fee amounts
This document contains code for a sports club management system with the following key features:
1. It defines a Club class to control overall functions like member registration, fee payment, searching, etc.
2. Functions include inputting member details, displaying main menu options for listing members, facility details, fee statements, and ex-member information.
3. Menu options allow registering new members, modifying member info, deleting records, searching by member code, and listing members by activity or all members.
4. Fee functions provide date-wise collection reports and lists of members with outstanding fees.
5. The program manages member codes, names, addresses, contact details, activity codes, fee amounts
Original Description:
Computer Science Project For Sports Club Management
This document contains code for a sports club management system with the following key features:
1. It defines a Club class to control overall functions like member registration, fee payment, searching, etc.
2. Functions include inputting member details, displaying main menu options for listing members, facility details, fee statements, and ex-member information.
3. Menu options allow registering new members, modifying member info, deleting records, searching by member code, and listing members by activity or all members.
4. Fee functions provide date-wise collection reports and lists of members with outstanding fees.
5. The program manages member codes, names, addresses, contact details, activity codes, fee amounts
This document contains code for a sports club management system with the following key features:
1. It defines a Club class to control overall functions like member registration, fee payment, searching, etc.
2. Functions include inputting member details, displaying main menu options for listing members, facility details, fee statements, and ex-member information.
3. Menu options allow registering new members, modifying member info, deleting records, searching by member code, and listing members by activity or all members.
4. Fee functions provide date-wise collection reports and lists of members with outstanding fees.
5. The program manages member codes, names, addresses, contact details, activity codes, fee amounts
Download as DOCX, PDF, TXT or read online from Scribd
Download as docx, pdf, or txt
You are on page 1of 37
At a glance
Powered by AI
The document describes a sports club management system with classes and functions for managing member registration and details, fees collection, and ex-member functions.
The main classes described are 'club' which controls overall functions, and its functions include input, menu, print etc. Main functions include registration, modification, deletion, search, fees collection, ex-member information.
Member data is stored in object arrays 'ob' of class 'club' and retrieved/written from/to files like 'project.txt' using file streams on reading/writing the class object. Flags are used to mark active/deleted members.
int code2,code3,code4,code5,code6; int i=0,j,temp,day,nba,nba1,t=0,p=0; char ch,ch5,ch6,chi1,chi2,chi3,opt;
//********************************************************** // CLASS NAME : CLUB // DETAILS : IT CONTROLS OVER ALL THE FUNCTIONS //**********************************************************
class club { char code,ch1,ch2,ch3; int code1,flag; float amt,no;//amt->amount deposited for membership long telno1,telno2;//office and residential telephone nos. respectively char addr[40],addr1[40];//addr->residential,addr1->office char name[20];//name of the member char c1,c2,c3,c4,c5,c6;//date variables for membership dates char d1,d2,d3,d4,d5,d6;//date variables for submission of fees float due;//gives the fees due public: int retcode1() { return code1;//member's code } void instruct();//displays the instructions on the screen void input();//gets the details of the member void menu();//creates main menu and calls other functions void back();//gives choice to the user to go back to main menu void print();//displays the details of the member on the screen void show();// displays the details of the member and the fees due //(FOR LISTING OF MEMBERS) void func1a();//for registration of a new member void func1b();//for modification in member's information void func1c();//for deletion of records of members who have left void func1d();//search for the info of a memberwhose code is known void func1e();//activity wise member code and name void func1f();//info about all members of the club //(FOR STATEMENT OF FEES) void func3a();//datewise fees collected from members void func3b();//list of members whose fees is due //(FOR EXMEMBERS INFORMATION) void func4a();//information of exmember void func4b();//recover deleted data(member rejoining) }; club ob[10],ob1;
//**************************************************************** // THIS FUNCTION GIVES CHOICE TO THE USER TO GO BACK TO MAIN MENU //****************************************************************
void club::back() { cout<<"\nDO YOU WANT TO GO BACK TO THE MAIN MENU: "; cin>>ch2; if(ch2=='y'||ch2=='Y') menu(); else exit(0); }
//******************************************************* // THIS FUNCTION DISPLAYS THE INSTRUCTIONS ON THE SCREEN //*******************************************************
void club::instruct() { clrscr(); cout<<"\nWELCOME TO "; cout<<endl; cout<<setw(53)<<"SPORTS CLUB MANAGEMENT SYSTEM\n"; cout<<setw(52)<<" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"; cout<<endl<<endl; cout<<" INSTRUCTIONS "; cout<<endl; cout<<"\n(1) IF YOU DON'T OPT TO GO BACK TO MAIN MENU THE PROG. TERMINATES"; cout<<"\n(2) THE FORMAT OF DATE SHOULD BE DD/MM/YY"; cout<<"\n(3) AMOUNT TO BE DEPOSITED BETWEEN Rs. 1.00 & 7000.00"; cout<<"\n(4) THE DELETED DATA IS STORED IN DEL.TXT FILE "; cout<<"\n(5) THE FEE FILE CONTAINS DATA OF THOSE WHOSE FEE IS DUE"; cout<<"\n(6) FACILITY CODES EXIST BETWEEN 1-6"; cout<<"\n\n"; cout<<"PRESS A KEY TO CONTINUE"; getch(); }
//***************************************** // THIS FUNCTION GTS THE INPUT OF A MEMBER //*****************************************
//********************************************************** // THIS FUNCTION CREATE MAIN MENU AND CALLS OTHER FUNCTIONS //**********************************************************
void club::menu() { alm:clrscr(); cout<<setw(53)<<"SPORTS CLUB MANAGEMENT SYSTEM\n"; cout<<setw(52)<<" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"; cout<<endl<<endl; cout<<setw(40)<<"MENU\n\n"; cout<<" (1) LISTING OF MEMBERS\n"; cout<<" (2) FACILITY FILE\n"; cout<<" (3) STATEMENT OF FEES\n"; cout<<" (4) EXMEMBER'S INFORMATION\n"; cout<<" (5) EXIT THE PROGRAM\n"; cout<<endl<<endl; cout<<"INPUT YOUR CHOICE : "; cin>>ch1; if(ch1=='1') { clrscr(); cout<<"\nYOU HAVE CHOSEN OPTION 1\n"; cout<<endl<<endl; cout<<" LISTING OF MEMBERS\n"; cout<<endl<<endl; cout<<"(1) REGISTRATION OF NEW MEMBER \n"; cout<<"(2) MODIFICATIONS IN MEMBERS INFORMATION\n"; cout<<"(3) DEL. OF RECORD FOR THE MEMBER WHO HAS LEFT\n"; cout<<"(4) SEARCHING FOR THE INFO. OF A MEMBER WHOSE ONE OF THE MAIN FIELD IS KNOWN\n"; cout<<"(5) ACTIVITY WISE MEMBERS CODE AND NAME\n"; cout<<"(6) INFORMATION ABOUT ALL THE MEMBERS OF THE CLUB\n"; cout<<endl<<endl; cout<<"INPUT THE OPTION : "; cin>>ch3; switch(ch3) { case '1':func1a(); case '2':func1b(); case '3':func1c(); case '4':func1d(); case '5':func1e(); case '6':func1f(); } } if(ch1=='2') { clrscr(); cout<<"\nYOU HAVE CHOSEN OPTION 2\n"; cout<<endl<<endl; cout<<" FACILITY FILE\n"; cout<<"\nLIST OF THE FACILITIES AVAILABLE IN THE CLUB\n"; cout<<endl<<endl; cout<<"PRESS A KEY TO CONTINUE "; getch(); cout<<"\nTHE VARIOUS COMBINATIONS OF FACILITIES AVAIL. ARE AS FOLLOWS"; cout<<endl<<endl;
cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"; cout<<"\nDO YOU WANT TO GO BACK TO THE MAIN MENU: "; cin>>ch2; if(ch2=='y'||ch2=='Y') goto alm; } if(ch1=='3') { clrscr(); cout<<"\nYOU HAVE CHOSEN OPTION 3\n"; cout<<endl<<endl; cout<<" STATEMENT OF FEES\n"; cout<<endl<<endl; cout<<"(1) DATEWISE FEES COLLECTED FROM MEMBERS \n"; cout<<"(2) LIST OF MEMBERS WHOSE FEES IS DUE \n"; cout<<endl<<endl; cout<<"INPUT THE CHOICE : "; cin>>chi2; switch(chi2) { case '1':func3a(); case '2':func3b(); } } if(ch1=='4') { clrscr(); cout<<"\nYOU HAVE CHOSEN OPTION 4\n"; cout<<endl<<endl; cout<<" EXMEMBERS INFORMATION\n"; cout<<endl<<endl; cout<<"\n(1) INFORMATION OF EXMEMBER'S"; cout<<"\n(2) RECOVER DELETED DATA (MEM. REJOINING)"; cout<<"\nINPUT THE CHOICE : "; cin>>chi3; switch(chi3) { case '1':func4a(); case '2':func4b(); } } if(ch1=='5') { clrscr(); cout<<endl<<endl; cout<<"\t\t\tPRESS A KEY TO EXIT : "; getche(); exit(0); } }
//************************************************** // THIS FUNCTION DISPLAYS PARTICULARS OF A MAMBERER //**************************************************
//************************************** // THIS FUNCTION REGISTERS A NEW MEMBER //**************************************
void club::func1a() { if(ch3=='1') { clrscr(); cout<<"\nYOU HAVE CHOSEN OPTION 1\n"; cout<<endl<<endl; cout<<"(1) REGISTRATION OF NEW MEMBER \n"; cout<<endl<<endl; cout<<"PRESS A KEY TO CONTINUE : "; getche(); fstream f1("project.txt",ios::ate|ios::in|ios::binary); fstream f2("project.txt",ios::out|ios::app|ios::in|ios::binary); do { if(f2.eof())break; ob[i].input(); f2.write((char*)&ob[i++],sizeof(ob[i++])); cout<<endl; cout<<endl<<endl; cout<<"DO YOU WANT TO INPUT MORE INFORMATION(Y/N) = "; ch=getche(); } while(ch=='y'||ch=='Y'); } back(); }
//**************************************************** // THIS FUNCTION IS USED TO MODIFY RECORD OF A MEMBER //****************************************************
void club::func1b() { if(ch3=='2') { clrscr(); cout<<"\nYOU HAVE CHOSEN OPTION 2\n"; cout<<endl<<endl; cout<<"(2) MODIFICATIONS IN MEMBER'S INFORMATION\n"; cout<<endl<<endl; cout<<"PRESS A KEY TO CONTINUE : "; getche(); take1:cout<<"PLEASE ENTER THE CODE NO OF THE MEMBER WHOSE DATA IS TO BE MODIFIED = "; cin>>code4; cout<<endl<<endl; fstream f1("project.txt",ios::ate|ios::in|ios::binary); for(j=0;j<i;j++) { f1.read((char*)&ob[j],sizeof(ob[j])); if(code4==ob[j].code1 && ob[j].flag==0) { cout<<"\n\n\nTHE CODE CHOSEN IS =: "<<code4; cout<<"\n\n\nPRESS ENTER TO CONTINUE : "; getche(); cout<<"\n(1)CHANGE IN MEMBERS RES. ADDRESS "; cout<<"\n(2)CHANGE IN MEMBERS OFF. ADDRESS "; cout<<"\n(3)CHANGE IN MEMBERS OFF. PHONE NO. "; cout<<"\n(4)CHANGE IN MEMBERS RES. PHONE NO. "; cout<<"\n(5)CHANGE IN MEMBERS FACILITY CODE "; cout<<"\n\nINPUT OPTION = " ; cin>>opt; if(opt=='1') { clrscr(); cout<<"\t\t\tYOU HAVE CHOSEN OPTION A " ; cout<<"\n\nCHANGE IN MEMBERS RES. ADDRESS "; f1.seekg(+22,ios::end); cout<<"\n\nTHE OLD ADDRESS OF THE MEMBER IS = "; puts(ob[j].addr); cout<<"\n\nINPUT THE NEW ADDRESS OF THE MEMBER = "; gets(ob[j].addr); f1.write((char*)&ob[j].addr,sizeof(ob[j].addr)); cout<<"THE DATA OF THE MEMBER WITH THE CHANGED ADDRESS IS: "; ob[j].print(); } if(opt=='2') { clrscr(); cout<<"\t\t\tYOU HAVE CHOSEN OPTION 2 " ; cout<<"\n\nCHANGE IN MEMBERS OFF. ADDRESS "; f1.seekg(+21,ios::end); cout<<"\n\nTHE OLD OFF. ADDRESS OF THE MEMBER IS = "; puts(ob[j].addr1); cout<<"\n\nINPUT THE NEW ADDRESS OF THE MEMBER = "; gets(ob[j].addr1); f1.write((char*)&ob[j].addr1,sizeof(ob[j].addr1)); cout<<"THE DATA OF THE MEMBER WITH THE CHANGED ADDRESS IS: "; ob[j].print(); } if(opt=='3') { clrscr(); cout<<"\t\t\tYOU HAVE CHOSEN OPTION 3 " ; cout<<"\n\nCHANGE IN MEMBERS OFF. PHONE NO. "; f1.seekg(+20,ios::end); cout<<"\n\nTHE OLD OFF. PHONE NO OF THE MEMBER IS = "; cout<<ob[j].telno1; cout<<"\n\nINPUT THE NEW OFF. PHONE NO OF THE MEMBER = "; cin>>ob[j].telno1; f1.write((char*)&ob[j].telno1,sizeof(ob[j].telno1)); cout<<"THE DATA OF THE MEMBER WITH THE CHANGED OFF. PHONE NO IS: "; ob[j].print(); } if(opt=='4') { clrscr(); cout<<"\t\t\tYOU HAVE CHOSEN OPTION 4 " ; cout<<"\n\nCHANGE IN MEMBERS RES. PHONE NO "; f1.seekg(+16,ios::end); cout<<"\n\nTHE OLD RES. PHONE NO OF THE MEMBER IS = "; cout<<ob[j].telno2; cout<<"\n\nINPUT THE NEW RES. PHONE NO OF THE MEMBER = "; cin>>ob[j].telno2; f1.write((char*)&ob[j].telno2,sizeof(ob[j].telno2)); cout<<"THE DATA OF THE MEMBER WITH THE CHANGED RES. PHONE NO IS: "; ob[j].print(); } if(opt=='5') { clrscr(); cout<<"\t\t\tYOU HAVE CHOSEN OPTION 5 " ; cout<<"\n(5)CHANGE IN MEMBERS FACILITY CODE "; f1.seekg(+12,ios::end); cout<<"\n\nTHE OLD FACILITY CODE OF THE MEMBER IS = "; cout<<ob[j].code; cout<<"\nFOR REFERING TO CODES,CHOSE THE FACILITY FILE OPTION "; cout<<"\n\nINPUT THE NEW FACILITY CODE OF THE MEMBER = "; cin>>ob[j].code; f1.write((char*)&ob[j].code,sizeof(ob[j].code)); cout<<"THE DATA OF THE MEMBER WITH THE CHANGED FACILITY CODE IS: "; ob[j].print(); } cout<<endl<<endl<<endl; cout<<"DO YOU WANT TO MODIFY ANY OTHER MEMBERS INFORMATION(Y/N) : "; cin>>chi1; if(chi1=='y'||chi1=='Y') { clrscr(); goto take1; } else back(); } } } cout<<endl<<endl<<endl; back(); }
//******************************************** // THIS FUNCTION DELETES THE RECORD OF MEMBER //********************************************
void club::func1c() { if(ch3=='3') { clrscr(); cout<<"\nYOU HAVE CHOSEN OPTION 3\n"; cout<<endl<<endl; cout<<"(3) DEL. OF RECORD FOR THE MEMBER WHO HAS LEFT\n"; cout<<endl<<endl; cout<<"PRESS A KEY TO CONTINUE : "; getche(); cout<<"INPUT THE CODE NO. OF THE MEMBER WHOSE DATA YOU WANT TO DELETE = "; cin>>code2; fstream f1("project.txt",ios::ate|ios::in|ios::binary); for(j=0;j<i;j++) { f1.read((char*)&ob[j],sizeof(ob[j])); if(code2==ob[j].code1 && ob[j].flag==0) { ob[j].flag=1; cout<<"\nTHE INFORMATION IS NOW DELETED BUT CAN BE RECOVERED "; cout<<"\nPRESS A KEY TO VIEW THE DELETED INFORMATION "; getch(); ob[j].print(); } else if(code2==ob[j].code1 && flag==1) cout<<"\nTHE DATA IS ALREADY DELETED"; } } back(); }
//************************************** // THIS FUNCTION SEARCHES FOR THE MEMBER //**************************************
void club::func1d() { if(ch3=='4') { clrscr(); cout<<"\nYOU HAVE CHOSEN OPTION 4\n"; cout<<endl<<endl; cout<<"(4) SEARCHING FOR THE INFO. OF A MEMBER WHOSE ONE OF THE MAIN FIELD IS KNOWN\n"; cout<<endl<<endl; cout<<"\nPRESS A KEY TO CONTINUE : "; getche(); do { cout<<"\nINPUT THE CODE NO. OF THE MEMBER WHOSE DATA YOU WANT = "; cin>>code3; fstream f1("project.txt",ios::ate|ios::in|ios::binary); for(j=0;j<i;j++) { f1.read((char*)&ob[j],sizeof(ob[j])); if(code3==ob[j].retcode1() && ob[j].flag==0) { cout<<"A MATCH HAS BEEN FOUND :"; cout<<"\n\nPRESS A KEY TO CONTINUE : "; getch(); ob[j].print(); } } cout<<endl; cout<<"\nDO YOU WANT TO SEARCH FOR ANY OTHER MEMBER (Y/N)= "; ch=getche(); } while(ch=='y'||ch=='Y'); } back(); }
//************************************************************ // THIS FUNCTION DISPLAYS ACTIVITY WISE MEMBERS CODE AND NAME //************************************************************
void club::func1e() { if(ch3=='5') { clrscr(); cout<<"\nYOU HAVE CHOSEN OPTION 5\n"; cout<<endl<<endl; cout<<"(5) ACTIVITY WISE MEMBERS CODE AND NAME\n"; cout<<endl<<endl; cout<<"\nPRESS A KEY TO CONTINUE : "; getche(); cout<<"THE VARIOUS COMBINATIONS OF ACTIVITIES AVAILABLE IN "; cout<<"THE CLUB ARE GIVEN BELOW :"; cout<<"\n(1) SWIMMING \t\t(2) TENNIS\t\t(3) SQUASH\t\t(4) ALL"; cout<<"\n(5) 1 & 2 \t\t(6) 2 & 3\t\t(7) 1 & 3 "<<endl; cout<<"\nPRESS ENTER TO VIEW THE NAMES & CODES OF MEMBERS UNDER EACH ACTIVITY"; getch(); clrscr(); fstream f1("project.txt",ios::ate|ios::in|ios::binary);
cout<<"\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~"; cout<<"\nFAC. CODE \t\t MEM. CODE NO \t\t NAME "; cout<<"\n~~~~~~~~~ \t\t ~~~~~~~~~~~~ \t\t ~~~~";
//********************************************************************** // THIS FUNCTION DISPLAYS INFORMATION ABOUT ALL THE MEMBERS OF THE CLUB //**********************************************************************
void club::func1f() { if(ch3=='6') { clrscr(); cout<<"\nYOU HAVE CHOSEN OPTION 6\n"; cout<<endl<<endl; cout<<"(6) INFORMATION ABOUT ALL THE MEMBERS OF THE CLUB\n"; cout<<"\nPRESS A KEY TO CONTINUE : "; getche(); fstream f1("project.txt",ios::ate|ios::in|ios::binary); for(j=0;j<i;j++) { f1.read((char*)&ob[j],sizeof(ob[j])); if(ob[j].flag==0) ob[j].print(); } } cout<<endl<<endl; back(); }
//************************************************* // THIS FUNCTION DISPLAYS DATE WISE FEES COLLECTED //*************************************************
void club::func3a() { if(chi2=='1') { clrscr(); cout<<"\nYOU HAVE CHOSEN OPTION 1"; cout<<"\n(1) DATEWISE FEES COLLECTED FROM MEMBERS \n"; cout<<"\n\n\n\n"; cout<<"INPUT THE CODE NO. OF THE MEMBER : "; cin>>nba; fstream f1("project.txt",ios::ate|ios::in|ios::binary); fstream mf("feefile.txt",ios::out|ios::app|ios::in|ios::binary); for(j=0;j<i;j++) { f1.read((char*)&ob[j],sizeof(ob[j])); if(nba==ob[j].code1 && ob[j].flag==0) { clrscr(); cout<<"\n\n\nTHE CODE CHOSEN IS =: "<<nba; cout<<"\nYOU ARE ";puts(ob[j].name); cout<<"\nYOU HAD DEPOSITED RS.: "<<ob[j].amt; cout<<"\nFEE SUBMITTED ON : / / "; gotoxy(19,8); putch(ob[j].d1); gotoxy(20,8); putch(ob[j].d2); gotoxy(22,8); putch(ob[j].d3); gotoxy(23,8); putch(ob[j].d4); gotoxy(25,8); putch(ob[j].d5); gotoxy(26,8); putch(ob[j].d6); cout<<"\nTHE AMOUNT FOR 30 DAYS IS RS. 3500"; cout<<"\nENTER THE NUMBER OF DAYS AFTER WHICH YOU ARE DEPOSITING THE AMT.:"; cin>>day; cout<<"\n\n\nPRESS ENTER TO CONTINUE : "; getche(); cout<<endl<<endl; if(day<30 && ob[j].amt>=3500) cout<<"\n\n NO AMOUNT DUE. "; else if(day==30 && ob[j].amt>3500) cout<<"\n\n NO AMOUNT DUE. "; else if(day>=30 && ob[j].amt<3500) { cout<<"\n\nYOUR AMOUNT IS DUE : "; cout<<"\nTRANSFERRING CONTROLLES"; ob[j].due=3500-ob[j].amt; cout<<"\nPRESS A KEY TO CONTINUE: "; getche(); cout<<"\nTHE AMOUNT DUE IS RS. "<<ob[j].due; mf.write((char*)&ob[j],sizeof(ob[j])); t++; } else if(day>=60 && ob[j].amt<7000) { cout<<"\t\t\t\t\nWARNING.."; cout<<"\n\nYOUR AMOUNT IS DUE : "; cout<<"\nTRANSFERRING CONTROLLES"; ob[j].due=7000-ob[j].amt; cout<<"\nPRESS A KEY TO CONTINUE: "; getche(); cout<<"\nTHE AMOUNT DUE IS RS. "<<ob[j].due; mf.write((char*)&ob[j],sizeof(ob[j])); t++; } else if(day>60 && ob[j].amt<3500) { cout<<"\t\t\t\t\nWARNING.."; cout<<"\n\nYOUR AMOUNT IS DUE : "; cout<<"\nTRANSFERRING CONTROLLES"; ob[j].due=10500-ob[j].amt; cout<<"\nPRESS A KEY TO CONTINUE: "; getche(); cout<<"\nTHE AMOUNT DUE IS RS. "<<ob[j].due; mf.write((char*)&ob[j],sizeof(ob[j])); t++; } } } } cout<<endl<<endl; back(); }
//********************************************************** // THIS FUNCTION DISPLAYS LIST OF MEMBERS WHOSE FEES IS DUE //**********************************************************
void club::func3b() { if(chi2=='2') { clrscr(); cout<<"\nYOU HAVE CHOSEN OPTION 2"; cout<<"\n(B) LIST OF MEMBERS WHOSE FEES IS DUE\n"; cout<<"\n\n\n\n"; getche(); fstream mf("feefile.txt",ios::ate|ios::in|ios::binary); for(j=0;j<t;j++) if(ob[j].flag==0) { mf.read((char*)&ob[j],sizeof(ob[j])); ob[j].show(); } } back(); }
//************************************************ // THIS FUNCTION DISPLAYS INFOMATION OF EXMEMBERS //************************************************
void club::func4a() { if(chi3=='1') { clrscr(); cout<<"\nYOU HAVE CHOSEN OPTION 1"; cout<<"\n\n\n\n"; cout<<"\n(1) INFORMATION OF EXMEMBERS"; cout<<"\nINPUT THE CODE NO. OF THE EXMEMBER WHOSE INFO. YOU WANT: "; cin>>code5; fstream f1("project.txt",ios::ate|ios::in|ios::binary); for(j=0;j<i;j++) { f1.read((char*)&ob[j],sizeof(ob[j])); if(code5==ob[j].code1 && ob[j].flag==1) { cout<<"\nA MATCH HAS BEEN FOUND :"; cout<<"\n\nPRESS A KEY TO CONTINUE : "; getch(); ob[j].print(); } } } back(); }
//********************************************************** // THIS FUNCTION IS USED TO MAKE AN EXMEMBER A MEMBER AGAIN //**********************************************************
void club::func4b() { if(chi3=='2') { a:clrscr(); cout<<"\nYOU HAVE CHOSEN OPTION 2"; cout<<"\n\n\n\n"; cout<<"\n(2) RECOVER DELETED DATA (MEM. REJOINING)"; cout<<"\nINPUT THE CODE NO. OF THE EXMEMBER : "; cin>>code6; fstream f1("project.txt",ios::ate|ios::in|ios::binary); for(j=0;j<i;j++) { f1.read((char*)&ob[j],sizeof(ob[j])); if(code6==ob[j].code1 && ob[j].flag==1) { cout<<"\nA MATCH HAS BEEN FOUND :"; cout<<"\nTRANSFERING CONTROLS"; ob[j].flag=0; cout<<"\n\nPRESS A KEY TO CONTINUE : "; getch(); ob[j].print(); cout<<"\nYOU ARE NOW A MEMBER OF THIS CLUB "; } } cout<<"\nDO YOU WANT TO CONTINUE :(Y/N): "; cin>>ch6; if(ch6=='y'||ch6=='Y') goto a; } cout<<endl<<endl; back(); }
//********************************************************** // THIS FUNCTION IS THE MAIN FUNCTION CALLING THE MAIN MENU //**********************************************************