bool UserInterface::Find() { string firstName, lastName; cout << "please enter the first name of the person you wish to find" << endl << ">> "; cin >> firstName; cout << "please enter the last name of the person you wish to find" << endl << ">> "; cin >> lastName; Person* result = myBook->FindPerson(firstName, lastName, myBook->GetRoot()); if (result == NULL) cout << "the person was not found, please ensure you have the correct name" << endl; else cout << result->GetFirstName() << "\t\t" << result->GetLastName() << "\t\t" << result->GetNumber() << endl; return result != NULL; }
bool operator<(int i, Person& p) { return i < p.GetNumber(); }