|
-
May 4th, 1999, 09:22 AM
#1
What's Wrong Here ???
Trying to serialize an array of CPoint elements without much success. Appreciate if someone could point out either what I'm doing wrong or what else I need to do. Thanks in advance.
Here's the code:
void CSimpleAppDoc::Serialize(CArchive& ar)
{
Serialize(ar);
if (ar.IsStoring())
{// storing code
ar << m_Color; //Store the pen color
ar << m_ptCount; //Store the drawing
for (int i = 0; i < m_ptCount; i++) {
ar << PointArray<i>.x;
ar << PointArray<i>.y;
}
}
else
{// loading code
ar >> m_Color; //Retrieve pen color
ar >> m_ptCount; //Retrieve drawing
for (int i = 0; i < m_ptCount; i++)
{
ar >> PointArray<i>.x;
ar >> PointArray<i>.y;
}
}
}
-
May 5th, 1999, 03:04 AM
#2
Re: What's Wrong Here ???
Delete the line "Serialize(ar);"
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
|