I have a stringstream. I want to use it to write unformatted data.
It works ok, I have a custom class with methods to put and get 'simple' data'
Now I'd want to get the data stored in its buffer. (the whole buffer). I'll use to send it over the network, or to save it into a binary file.
Sincerely, I dont know how to, and also I have the impression that some kind of copy are going to be made.
I dont know if can be a better solution to use memcpy, because I have allways access to the buffer used.
Any advice ?
Thanks.