Question: C++ phonebook program help The core of your program will be the 2 search functions that are used to find results. One will be a

C++ phonebook program help

The core of your program will be the 2 search functions that are used to find results. One will be a recursive search (using recursion) and the other will be an iterative search (using a loop). You are to implement these functions in a separate file from your main.cpp. You will have one header file (.h) with the function definitions and an implementation file (.cpp). You MUST use the following function prototypes to complete this program. You may call one or more functions from these methods but these must be the ones your search engine calls after the user enters a query.

The function definitions are listed below:

int searchRecursive(std::vector<:string> &data, std::string query);

int searchIterative(std::vector<:string> &data, std::string query);

I'm not sure how to write the recursive and iterative searches. They are supposed to search through a contact list for the same contact and display it. The sample input is:

Lara Bush 2142842934 Kaiy Bates 2143954218 Laren Graham,7130385534 Kortney Kardasian2149492789 Doak Waker5127834500

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!