C
Clark Sims
I have this code fragment in a lot of my programs:
std::filebuf _fbuf;
....
_fbuf.pubseekoff( _initial_number_pages*_page_size - 1, std::ios_base::beg);
_fbuf.sputc(0);
_fbuf.pubsync();
I have noticed that the new areas of the file, are always set to the null character.
Is this behavior defined by some standard, or is this just a quirk of the systems I have been using.
Thanks in Advance,
Clark
std::filebuf _fbuf;
....
_fbuf.pubseekoff( _initial_number_pages*_page_size - 1, std::ios_base::beg);
_fbuf.sputc(0);
_fbuf.pubsync();
I have noticed that the new areas of the file, are always set to the null character.
Is this behavior defined by some standard, or is this just a quirk of the systems I have been using.
Thanks in Advance,
Clark