Untitled
#include <iostream> #include <vector> #include <string> #include <fstream> using namespace std; int main() { vector <string> str; fstream in("input.txt"); string s; while (in>>s) { str.push_back(s); } sort(str.begin(), str.end()); for (auto i : str) cout << ' '; }