CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2002
    Posts
    55

    rewind(stream) without overwriting data

    I'm fighting streams, I write something to the end of my file and if I then rewind the stream and write something, instead of inserting the data there, it just writes over the old data in that position. Is there a way I can change this behaviour?
    Thx

  2. #2
    Join Date
    Apr 2002
    Location
    India
    Posts
    26
    Hi,
    You can not add or delete any record in between a file.
    Better way write the above portion in to a temp file add your that
    record, again write the rest of your file in the temp file. Delet the original file rename that temp file to original file name.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured