// This while allows entry until ‘quit’ is entered
int main(){
vector<string> name;
getLists(name);
displayLists(name);
string tmp;
system("pause");
return EXIT_SUCCESS;
}
void getLists(vector<string>& names){
while (true) {
string tmp;
cout << "Enter a name (quit to stop): ";
cin >> tmp;
if (tmp == "quit") break;
names.push_back(tmp);
}
}
void displayLists(vector<string>names) {
for(int i = 0; i < names.size(); i++) {
cout << names[i] << endl;
}
sortNames()
}