I want to use iostream to read write data into memory, but I dont know how to .
I lose myself with the way to create the io instance, asociate initial memory, etc.
Basically I'd want to create a vector of io elements, on each vector I want to select the io object and then read - write data of any kind.
I want to have the benefits of to use the 'write', put, seek, << , ><, etc.
But the iostream ask me for a streambuf iostream (streambuf * sb);, and this element only let me to use filebuf and stringbuf :
This is an abstract base class, therefore no objects can be directly instantiated from it. The standard hierarchy defines two classes derived from this one that can be used to directly instantiate objects: filebuf and stringbuf.
So, my question is 'can I use this to work in memory' ? stringbuf is the way ?
Thanks
Bookmarks