For a function that takes an output stream as an argument:
void Foo(const std::ostringstream& _oss);
Is there a way to write a stream buffer to a file WITHOUT calling str ()?
I want to avoid copying the buffer (which str () does).
void Foo(const std::ostringstream& _oss);
{
std::ofstream f("foo.bin");
}
source
share