Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

convert std::string to basic_ostream?

Tags:

c++

Is there a conversion for the above?

like image 656
Tony The Lion Avatar asked Jun 24 '10 13:06

Tony The Lion


1 Answers

Convert a std::string to an output stream? Usually it's: convert a string to an input stream that reads characters from the given string:

std::string myString = //...
std::istringstream iss(myString);

See also: http://www.cplusplus.com/reference/iostream/istringstream/

like image 138
Daniel Trebbien Avatar answered Oct 10 '22 04:10

Daniel Trebbien