Consider this piece of code:
After extracting an integer from the stream you will still get the entire stream when calling .str(), meaning "1 2 3". Is there some easy way of retrieving what's left in the stream, in this case "2 3"?Code:std::string S = "1 2 3"; std::stringstream SS(S); int I; SS >> I; std::cout << SS.str().c_str();