Tuesday, June 7, 2016

[C++] String Stream

#include #include 
using namespace std; /* * */ 
int main(int argc, char** argv) 
 stringstream ss ; 
 int x, y, value; 
 ss << "123 456 789"; 
 ss >> x >> y >> value; 
 cout << "X:" << x << " Y:" << y << " Value:" << value << endl; 
 return 0; 
}

No comments: