Original Post
What would make the ofstream::write command shorten a file??
I am writing a char buffer to the middle of a binary archive file, and after all is done, I check the archive file and find that it''s exacly ((sizeof(char)* buffersize) + 1) smaller than it was before I wrote to it. I debuged it, but I don''t know what the heck would cause this in the first place, so I didn''t get very far.
All I used was ofstream::write(buffer,ios::binary|ios::out),
and it eats my file instead of writing over it. Even if you just write a bunch of crap or NULLS to the middle of a file the file shouldn''t be able to readjust itself to cover up the NULLS should it?