Well, there are two ways. I'm not sure how familiar you are with MFC, but the usual way to save off data objects in MFC in through persistence (serialization). Our Vector data object have Serialize methods that are setup to output/input to a CArchive object in MFC. That is the easiest way. Our application note in the help on the document/view architecture discusses serialization.
If you are unfamiliar with serialization and don't want to learn it, then you could just make the first 4 bytes of the file, the size in bytes of the data array and read it off first so you know how much data is in the file.
Best Regards,
Chris Matthews
National Instruments