Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

serialize probs...

Status
Not open for further replies.

josphin

Programmer
Apr 5, 2003
19
BE
Hi all,...

i'm building a dialog app, and now i want to write a CArray to a file and load it from one.

The problem is that the CArray is initialized in the main class (CKassaDlg) and it contains object from another class i made myself (CProducten). I can't figure out in wich one of the two classes i should define the serliazation (no compile errors when i put the serialize function in the CProducten class, but i can't write the whole array at once i think ...). CProducten is derived from CObject, but then i (think, i) have to write datamember per datamember. It must be possible to write the whole carray to a file in one time (i presume a carchive is necessary...).
When i follow the msdn library i get the compile error :
&quot;binary '<<' : no operator defined which takes a left-hand operand of type 'class CArchive' &quot;

i put the code online:
thanks in advance, josphin.
 
your post is not clear to me but maybe the problem is that CArray is NOT Serializable. Maybe if you use CObArray that would help to solve some of your problems.

-pete
[sub]I just can't seem to get back my IntelliSense[/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top