We do not know how long the words will be (except not longer than a line) so a std::string more suitable for this. Plus, we can now use instead of checking for a character ourselves.