//File : LongHomework1.cpp (programming challenge 10) //Author : Andre Long //Due : August 25, 2004 //Description : This program lets the user enter a full or partial name and search for a predefined //string which matches the user input #include #include using namespace std; void matchMachine( string PhoneNumList[ ], string userString); //function prototype int main () { string PhoneNumList[11]; //array declaration string userString; //varible declaration cout<<"Enter the full, first, or last name of the person you are looking for. "; //instructions cin>>userString; //user input PhoneNumList[0] = "Becky Warren, 678-1223"; //initialize array PhoneNumList[1] = "Joe Looney, 586-0097"; PhoneNumList[2] = "Geri Palmer, 223-8787"; PhoneNumList[3] = "Lynn Presnell, 887-1212"; PhoneNumList[4] = "Holly Gaddis, 223-8878"; PhoneNumList[5] = "Sam Wiggins, 486-0998"; PhoneNumList[6] = "Bob Kain, 586-8712"; PhoneNumList[7] = "Tim Haynes, 586-7676"; PhoneNumList[8] = "Warren Gaddis, 223-9037"; PhoneNumList[9] = "Jean James, 678-4939"; PhoneNumList[10]= "Ron Palmer, 486-2783"; matchMachine(PhoneNumList, userString ); //call function return 0; } void matchMachine( string PhoneNumList [ ], string userString ) //function definition { int line; int position=0; for ( line = 0; line <11; line++ ) { if ( PhoneNumList[line].find(userString ) != string::npos )//standard sentinel constant { //for the "find" member function for this Microsoft cout<< PhoneNumList[line] <