0

I'm using std::ostringstream to serialize data to send it through sockets later. Now I'm using std::ostringstream::str() function to get access to the data, but I would like to avoid copying the data.

Is this possible to get access to the underlying data buffer in std::ostringstream (const char* or something similar)?

Mircea Ispas
  • 20,260
  • 32
  • 123
  • 211

0 Answers0