3

I want to serialize and deserialize a list of objects into a file. But I found that if I use CArchive, the new content will overwrite the original content in the file, which is not my expectation. Is there any method to allow me to read and write from a specified location in the file? Thank you!

user26404
  • 1,371
  • 4
  • 27
  • 38

1 Answers1

2

CArchive has a c'tor that takes a ptr to a CFile. Maybe if you pass it a file with the current pointer correctly set, it will do the trick.

Serge Wautier
  • 21,494
  • 13
  • 69
  • 110