I create this buffer for my stringstream.
char mybuffer [265536];
the_stream.rdbuf()->pubsetbuf(mybuffer,265536);
Aslo I have a fstream FILE object.
Ok, I fill the stream with data using write();
the_stream tellp() works fine.
The FILE.write works fine with basic data
( FILE.write((char*) &var,sizeof var); ) but
FILE.write(&mybuffer,nbytes); does not write nothing .....
Any idea ? Thanks
I take this oportunity to ask you if my stream - buffer - write schema could be improved. I want to use the stream to I/O operations first in memory and last to/from file.