标题:MFC图形文件的保存与打开问题
只看楼主
weilinfeng
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-12-24
 问题点数:0 回复次数:0 
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)
谁能帮忙看一下,解决一下了谢谢了
搜索更多相关主题的帖子: MFC 图形 nCount int 文件 
2007-06-12 19:34



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-146871-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.248383 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved