@grumpy
Taking that into consideration, I rewrote it to be more hassle-free for the user.
#include <iostream>
#include <string>
#include <vector>
#include <iterator>
#include <algorithm>
using namespace std;
int main() {
string end = ("no");
string inser;
string x;
vector<string> names;
cout << "Enter as many names as you'd like; Enter stop when you're finished." << endl;
do {
cin >> inser;
names.push_back(inser);
if(inser == ("stop")) {
names.pop_back();
cout << "If you would like to list the names you have written, enter \"list\". Otherwise, enter \"quit\" to end. To enter more names, enter \"more\"." << endl;
cin >> x;
}
if (x == ("list")) {
copy(names.begin(), names.end(), ostream_iterator<string>(cout, "\n"));
}
else if (x == ("more")) {
cout << "Okay, we'll enter more!";
cout << endl;
}
else {
if (x == ("quit")) {
end = ("quit");
}
}
}
while (end != ("quit"));
return 0;
}