|
-
May 9th, 1999, 03:31 PM
#1
Serialize a collection
How can I serialize the collection CTypedPtrMap<CMapStringToOb, CString, CMyOb*>
I have written the serialize code in MyObject,used IMPLEMENT_SERIAL, etc, and then put m_MapStringToOb.Serialize(ar) in the doc serialize section. When I try to save, it gives me an access violation, saying that I have no Runtime Class (as this needs to be written into the archive before any data is stored). Can anybody help.
-
June 2nd, 1999, 05:02 AM
#2
Re: Serialize a collection
you can not serialize a Class who is not inherited from CObject.
You must create a special class inherited from CObject then put all information of your CTypedPtrMap class in this class then serialize this class.
Beware with pointer, if i'm not wrong you can not seriqlize a pointer
Christian Niquille
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|