A stringstream works just like an input or output stream. So we could do something like this:
This would give you an output ofCode:#include <sstream>
int main()
{
std::stringstream ss;
ss << "100 200 300";
int x;
while(ss >> x)
std::cout >> x >> std::endl;
return 0;
}
100
200
300
--
Mats

