1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <iostream> #include <string> #include <vector> using std::string; using std::vector; int main() { string s; vector<string> text; while (std::getline(std::cin, s)) text.push_back(s); for (vector<string>::iterator t = text.begin(); t != text.end(); t++) std::cout << *t << std::endl; return 0; }