CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    7

    Serializing my class, HOW?

    Is it possible for me to save a object of this class?

    class memory {
    public:
    memory();
    int m_Mem[MAXMEM];
    CString Noun[MAXWORDS];
    CString Adjective[MAXWORDS];
    CString Verb[MAXWORDS];
    CString Nothing[MAXWORDS];
    void CheckWord(CString word);
    void SortIn(CString word, int type);

    private:
    CExtraDlg ExtraDlg;
    int NounPosition;
    int AdjectivePosition;
    int VerbPosition;
    int NothingPosition;
    };

    It should be saved in this way:

    CFile f;
    f.Open("backup.iq",
    CFile::modeCreate | CFile::modeWrite);

    memory ar(&f, CArchive::store);

    ar << brain;


    a

  2. #2
    Guest

    Re: Serializing my class, HOW?

    derive yur memory class from CObject

    Add serialize handler function to you memory class.
    In your ProgDoc::Serialize call you memory instance .serialze









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