stringstream ss c++ code example
Example 1: stringstream in c++
std::stringstream os;
os << "12345 67.89"; // insert a string of numbers into the stream
std::string strValue;
os >> strValue;
std::string strValue2;
os >> strValue2;
// print the numbers separated by a dash
std::cout << strValue << " - " << strValue2 << std::endl;
Example 2: sstream c++
sstream str()