The program should read an unknown number of names and phone numbers from a file “data.txt” and store them in a vector of strings. The program should then ask the user for a transaction file name to load and process.
Im having a hard time putting the inputFile into the vector string. Please help. This is what i have so far:
Here is an example of "Data.txt":
Joe Garcia 858-343-2009
Amelia Perez 617-255-0987
Bob Haynes 858-765-1122
Tim Ducrest 760-877-1654
Kevin Garcia 760-543-5622
Suzy Walter 858-190-2307
Fang Yi 619-677-1212
Robert James 619-909-3476
Mary Palmer 760-435-2086
Wrap a struct, Person, around the variables fname, lname and phone and overload the Person ctor so that it is easier to construct Person objects as the file is being read into the program. Store these Person objects in std::vector<Person> and overload the insertion operator << to print the vector directly: