|
-
September 8th, 2012, 07:39 PM
#3
Re: fstream - Writing in the middle of a file
1) you need to open in : 2) Over-writing data in the middle of a file is done all the time.
It is simplest if the records are fixed length.
3) that being the case, you should also open in binary mode. ...
Code:
ios::in | ios::out | ios::binary
4) Normally, you would do unformatted I/O, not formatted I/O
Last edited by Philip Nicoletti; September 10th, 2012 at 06:22 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|