> I am wading through the learning curve of C to C++, having purchased
> VC4.0. Serialization has me baffled...
> Would anyone have a source code example of the following :
> 1) Serialize() class and how to read/write a series of char arrays to disk..
> 2) Serialize() class and how to read/write an array of converted C structures
> eg. an array of classes such as:
> CString stuff;
> UINT more_stuff:
> Thanks !
You'll probably want to look at the tutorial first. There's a pretty
decent explanation of serialization there, and examples in the Scribble
app on the CD.
In general, you'll override your own Serialize member for each class you
want to write to disk, and use the insertion operator to write and
extraction operator to read your object's members. In Scribble, the
OnFileOpen and OnFileSave handlers kick off the process. (I'm doing
this from memory, so these names may vary slightly.)
The tutorial on serialization is a pretty short read, and if you still
aren't clear after looking through it, ask, ask, ask.
Best of luck,