is a word delimited by space characters? if so
reads up to the next whitespace (spaces and newlines) so you will always read words. If you wish to read a line of text use getline()
http://www.cppreference.com/cppstring/getline.html
you can then see if there is a space charcater in the string using find()
http://www.cppreference.com/cppstring/index.html