MFC图形文件的保存与打开问题
void CDraw3Doc::Serialize(CArchive& ar) {
POSITION pos=GetFirstViewPosition();
CDraw3View *pView=(CDraw3View*)GetNextView(pos);
if (ar.IsStoring())
{
// TODO: add storing code here
int nCount=pView->m_ptrArray.GetSize();
ar<<nCount;
for(int i=0;i<nCount;i++)
{
ar<<pView->m_ptrArray.GetAt(i);
}
}
else
{
// TODO: add loading code here
int nCount;
ar>>nCount;
CGraph *pGraph;
for(int i=0;i<nCount;i++)
{
ar>>pGraph;
pView->m_ptrArray.Add(pGraph);
}
error C2678: binary '<<' : no operator defined which takes a left-hand operand of type 'class CArchive' (or there is no acceptable conversion)
error C2679: binary '>>' : no operator defined which takes a right-hand operand of type 'class CGraph *' (or there is no acceptable conversion)
谁能帮忙看一下,解决一下了谢谢了