Question: C++ Write a C++ program in a file named phonelist.cpp You're going to write some codes to enable searching in a phone list using the
C++
Write a C++ program in a file named phonelist.cpp
You're going to write some codes to enable searching in a phone list using the steps provided below. Step 1. Write the function prototype Write the function named searchPhoneList which receives three parameters. 1. The first parameter is for an array of string objects holding names and phone numbers. 2. The second parameter is for the number of string objects in the array. 3. The third parameter is for the string object containing the name to be looked up in the array. Step 2. Write the main function In the main function, define an array of string objects and initialize the array with a list of strings holding names and phone numbers. Use the list from #18, Phone Number List, in Programming Challenges, Chapter 10. Call the function named searchPhoneList and pass the following parameters: 1. The array of string objects. 2. The number of string objects in the array. 3. The name to look up in the array. Use "Palmer". Step 3. Implement the function searchPhoneList The function searches for the name in the array. If the name is found in an entry of the array. Display the entry, including the name and the phone number. If the name cannot be found, the function displays the following message: "The name does not exist in the phone list."
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
