123456789
std::string word; do { std::cout << "Enter a word: "; std::getline( std::cin, word ); } while ( word.empty() ); std::cout << word << std::endl;