Tuesday, June 4, 2013

stringstream to cout

std::stringstream ss;
unsigned long long ll = (unsigned long long)&ss;
cout << ll;
That said when you want to cout a stringstream you should use the str() function as follows:
cout << ss.str();

No comments:

Post a Comment