cout << " " << endl;
cout << " Press any key to return to menu ....";
input = getch();
if (input)
{
swim::displayMenu();
}
Expand|Select|Wrap|Line Numbers
- void Event::updateSwim()
- {
- char temp[50];
- clrscr();
- cout << "" << endl;
- cout << " Input Swimmers Name: ";
- cin.getline(temp,50);
- cin.ignore();
- int found = 0;
- for (int x = 0; x < numSwimmers && found!=1; x++)
- {
- if(strcmp(swimmers[x].name,temp) == 0)
- {
- found = 1;
- cout << " " << endl;
- cout << " Gender?(m/f): ";
- cin.getline(swimmers[x].sex, SIZE);
- cout << " " << endl;
- cout << " Event?: ";
- cin.getline(swimmers[x].event, SIZE);
- cout << " " << endl;
- cout << " Performance?: ";
- cin.getline(swimmers[x].perfrm, SIZE);
- cout << " " << endl;
- cout << " Name?: ";
- cin.getline(swimmers[x].name, SIZE);
- cout << " " << endl;
- cout << " Birthday?: ";
- cin.getline(swimmers[x].birthDate, SIZE);
- cout << " " << endl;
- cout << " Competition Date?: ";
- cin.getline(swimmers[x].compDate, SIZE);
- cout << " " << endl;
- cout << " Venue: ";
- cin.getline(swimmers[x].venue, SIZE);
- cout << " " << endl;
- cout << " Position Finished?(1-9): ";
- cin.ignore();
- cin >> swimmers[x].posF;
- }
- }
- }
Expand|Select|Wrap|Line Numbers
- void swim::updateSwim()
- {
- clrscr();
- cout << " " << endl;
- cout << " 2. Update Existing Swimmer Menu" << endl;
- cout << " --------------------------------" << endl;
- cout << " " << endl;
- cout << " Would you like to update an existing swimmer(y/n)?: ";
- cin >> inputv;
- if (inputv == 'y' || inputv == 'Y')
- {
- if (currentE == 1)
- {
- free100.updateSwim();
- cout << " " << endl;
- cout << " Press any key to return to menu ....";
- input = getch();
- if (input)
- {
- swim::displayMenu();
- }
- }
- else if (currentE == 2)
- {
- back200.updateSwim();
- cout << " " << endl;
- cout << " Press any key to return to menu ....";
- input = getch();
- if (input)
- {
- swim::displayMenu();
- }
- }
- else if (currentE == 3)
- {
- medley400.updateSwim();
- cout << " " << endl;
- cout << " Press any key to return to menu ....";
- input = getch();
- if (input)
- {
- swim::displayMenu();
- }
- }
- else if (currentE == 4)
- {
- back800.updateSwim();
- cout << " " << endl;
- cout << " Press any key to return to menu ....";
- input = getch();
- if (input)
- {
- swim::displayMenu();
- }
- }
- }
- else if (inputv == 'n' || inputv == 'N')
- swim::displayMenu();
- }