Reputation: 1659
Please consider this code:
std::stringstream test;
test << std::string("This is a test.");
std::string str;
test >> str;
std::cout << "\"" << str << "\"" << std::endl;
This outputs only the string "This", rather than "This is a test."
Why is this so, and how can I get the entire string?
Upvotes: 0
Views: 76