How do I convert from stringstream to string in C++?

Nick Bolton picture Nick Bolton · Mar 19, 2009 · Viewed 154.3k times · Source

How do I convert from std::stringstream to std::string in C++?

Do I need to call a method on the string stream?

Answer

Tyler McHenry picture Tyler McHenry · Mar 19, 2009

​​​​​​​

yourStringStream.str()