std::vector<std::string> words;
std::string word;
while (std::cin >> word)
words.push_back(word);
cout<<words[1];
i am using this to take input to create an array of words with whitespaces.but after ending of sentence using Enter, i am not getting any output.