#include <iostream>
#include <string>
std::ostream& operator<< ( std::ostream& stm, const std::string& s )
{ return stm << s.c_str() << " [size:" << s.size() << ']' ; }
std::istream& operator>> ( std::istream& stm, std::string& s )
{ return std::getline( stm, s ) ; }
int main()
{
std::string str ;
std::cout << "enter a line containing whitespace: " ;
std::cin >> str ;
std::cout << "you entered: " << str << '\n' ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgoKc3RkOjpvc3RyZWFtJiBvcGVyYXRvcjw8ICggc3RkOjpvc3RyZWFtJiBzdG0sIGNvbnN0IHN0ZDo6c3RyaW5nJiBzICkKeyByZXR1cm4gc3RtIDw8IHMuY19zdHIoKSA8PCAiIFtzaXplOiIgPDwgcy5zaXplKCkgPDwgJ10nIDsgfQoKc3RkOjppc3RyZWFtJiBvcGVyYXRvcj4+ICggc3RkOjppc3RyZWFtJiBzdG0sIHN0ZDo6c3RyaW5nJiBzICkKeyByZXR1cm4gc3RkOjpnZXRsaW5lKCBzdG0sIHMgKSA7IH0KCmludCBtYWluKCkKewogICAgc3RkOjpzdHJpbmcgc3RyIDsKICAgIHN0ZDo6Y291dCA8PCAiZW50ZXIgYSBsaW5lIGNvbnRhaW5pbmcgd2hpdGVzcGFjZTogIiA7CiAgICBzdGQ6OmNpbiA+PiBzdHIgOwogICAgc3RkOjpjb3V0IDw8ICJ5b3UgZW50ZXJlZDogIiA8PCBzdHIgPDwgJ1xuJyA7Cn0K