in c++ how to write string with out special and spaces code example Example: store string with spaces c++ std::string str; std::getline( std::cin, str);