// NAME: Page Lynn Potter // E-MAIL: ppotter3@cnm.edu or ppotter03@inbox.com // FILE: P1_NameSearch_Header.h // This program will cover strings, arrays, file I/O, pointers/references. // OBJECTIVE: Read a file of first names and search fro names entered by the user. #include // Needed for cin and cout #include // Needed for string values using namespace std; /* This is the function that will be responsible for displaying the program's introduction, main objective, rules, and a brief user greeting. */ void Objective_screen(string *pName); /* This is the function that will return a Boolean value, which is checked in main(). If the specified file can't be located, a message will be displayed to inform user, and the program with exit. If the file is found, the names[] array will be filled, and the total number of names that were read are returned to the main() function. */ bool ReadFile(string names[], int &rTotal); /* This function uses a modified version of the 'bubble sort' to sort the names from the data file in a fashion that is requested. */ void bubbleSort(string names[], int &rTotal); /* This function will use pointers and or references to obtain two names from the functions and then pass the specified names. */ void AskForTwoNames(string &rUserInput); /* The array, total number of names, and the user's specified selection of two names is passed to this function (SearchNames()). Then it will pass the results (whether the names were found and how many times the names occurred). */ void SearchNames(string names[], int &rTotal, string &rUserInput); /* The WriteOutput() function takes the values (User Input) that was passed to the function, and displays the results as well as outputs the results to the specified output file. The output file will serve as a brief summary for the user; if they desire to open it and read the information. */ bool WriteOutput(string *pName, string names[], int &rTotal, string &rUserInput);