[cpp] #if 1 #include <iostream> #include <sstream> using namespace std; int main() { int val1 = 512, val2 = 1024; ostringstream format_message; format_message << "val1: " << val1 << "\n" << "val2: " << val2 << "\n"; istringstream input_istring(format_message.str()); string dump1, dump2; input_istring >> dump1 >> val1 >> dump2 >> val2; cout << val1 << " " << val2 << endl; cout << format_message.str(); cout << dump1 << dump2 << endl; } #endif