|
-
May 18th, 1999, 02:38 PM
#1
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
-
May 21st, 1999, 09:47 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|