constk

For Andrew 2

Sep 17th, 2020
149
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void StudentList::ODINTREN()
  2. {
  3.     int i = 0;
  4.     string vvod;
  5.     //string dopFam, dopIMYA, dopOtches;
  6.     cout << "Для поиска студентов определённого тренера введите его введите ФИО" << endl;
  7.     cin.ignore(32767, '\n');
  8.     getline(cin, vvod);
  9.     //cin >> dopFam;
  10.     //cin >> dopIMYA;
  11.     //cin >> dopOtches;
  12.     Student* current = head;
  13.     while (current)
  14.     {
  15.         if (vvod.find(current->FAM) != string::npos || vvod.find(current->IMYA) != string::npos || vvod.find(current->OTCHESTREN) != string::npos)
  16.         {
  17.             cout << "|" << setw(2) << "№" << setw(2) << " | " << setw(12) << current->FAM << setw(12) << current->IMYA << setw(12) << current->OTCHES << setw(2) << "|" << setw(1) << current->Pol << setw(2) << "|" << setw(12) << current->Sport << setw(2) << "|" << setw(12) << current->Group << setw(2) << "|" << setw(12) << current->STREET << setw(4) << current->DOM << setw(4) << current->FLAT << setw(2) << "|" << setw(12) << current->FAMTREN << setw(12) << current->IMYATREN << setw(12) << current->OTCHESTREN << setw(2) << "|" << setw(2) << current->Med << setw(2) << "|" << setw(2) << current->Oplat << setw(2) << "|" << endl;
  18.             cout << "______________________________________________________________________________________________" << endl;
  19.             i++;
  20.         }
  21.         current = current->link;
  22.     }
  23.     if (i == 0)
  24.         cout << "К данному тренеру ещё не записались" << endl;
  25. }
RAW Paste Data