I am very new to the C++ STL, so this may be trivial. I have a ostream variable with some text in it.
ostream
ostream* pout; (*pout) << \"Some Tex
The question was on ostream to string, not ostringstream to string.
ostringstream
For those interested in having the actual question answered (specific to ostream), try this:
void someFunc(std::ostream out) { std::stringstream ss; ss << out.rdbuf(); std::string myString = ss.str(); }