#include <iostream> #include <stringstream> #include <vector> #include <string> using namespace std; int main() { vector<string> words; string line, currentword; while(getline(cin, line)) { if(line == "exit") break; istringstream stream(line) while(stream >> currentword) words.push_back(currentword); } } |