CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    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.


  2. #2
    Join Date
    May 1999
    Location
    Geneva
    Posts
    32

    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
  •  





Click Here to Expand Forum to Full Width

Featured