#include #include int main() { std::vector testvec; std::cout << "How many words do you want to put into the vector?\n"; int count(0); std::cin >> count; int x(0); while(x < count) { std::string aword; std::cout << "Input string\n"; std::cin >> aword; testvec.push_back(aword); ++x; } // sort words alpabetically and output in a column std::sort(testvec.begin(), testvec.end()); std::cout << "testvec has these words stored: \n"; for(int i(0); i != testvec.size(); ++i) { std::cout << testvec[i] << '\n'; } }