//Read in name and year born from a file into a vector #include #include #include using namespace std; int getFile(string names[],int yearBorn[]) { int count=0; string input,yearString; ifstream people("c:/mycpp/names2.txt"); //input file stream if(people) { //file was opened while(getline(people,input)) { //Example: input="Jay,1994" int p=input.find_first_of(","); //Example: p=3 if(p>=0) { names[count]=input.substr(0,p); //Example: name="Jay" yearString=input.substr(p+1); // Example: yearString="1994" yearBorn[count]=stoi(yearString); //stoi=String To Int, Example: yearBorn=1994 count++; }//there was a comma }//each line people.close(); } return count; }//getFile int search(string names[], string name, int size) { int found=-1; int i=0; while(found<0 && i=0) cout<