Streambuffers : filebuf and stringbuf, can be posible a memorybuf?

Is it possible?
I want to create a memorybuffer to hold char[] data and with similar features as fstream or stringbuf. Can anybody help me :

How can create this memorybuf to use a previous char[] I have ?
Any example ?
Thanks
Sure it's possible.

What exactly are you trying to do? If all you want is to work over a string you already have, just use the str() method of the istringstream() method to set the stringbuf...

[edit] Oh, I get it. You refuse to accept the answer in your other thread so you started a new one.
Try again.

http://www.cplusplus.com/forum/beginner/37286/#msg201875
Last edited on
Topic archived. No new replies allowed.