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 :
"binary '<<' : no operator defined which takes a left-hand operand of type 'class CArchive' "
i put the code online:
thanks in advance, josphin.
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 :
"binary '<<' : no operator defined which takes a left-hand operand of type 'class CArchive' "
i put the code online:
thanks in advance, josphin.