将代码从VS6迁移到VS2010时出现错误C2248 [英] error C2248 while migrating code from VS6 to VS2010

查看:91
本文介绍了将代码从VS6迁移到VS2010时出现错误C2248的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

帮助 在将代码从VS6迁移到VS2010时解决以下错误:


错误C2248:'CObject :: operator =':无法访问私有成员在'CObject'类中声明C:\Program Files \ Microsoft Visual Studio 10.0\VC\atlmfc\include\afxcoll.h

解决方案

您好,


您可以向我们提供有关您的代码的更多详细信息吗?


以下网页可能对您有所帮助:

http://msdn.microsoft.com/en-us/library/ccb3dh5c.aspx


但问题可能有点隐藏。您可能会使用一些需要参数实现复制/分配操作的类。所以像std :: map这样的复杂数据类型需要它们的参数才能实现这些。


与亲切的问候,


Konrad


Help required to resolve the the following error while migrating code from VS6 to VS2010:

error C2248: 'CObject::operator =' : cannot access private member declared in class 'CObject' C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\afxcoll.h

解决方案

Hi,

can you give us more details about your code?

Maybe the following webpage is already helpfull for you:
http://msdn.microsoft.com/en-us/library/ccb3dh5c.aspx

But the problem can be a little bit hidden. You might use some classes that require that parameters implement the Copy / Assign operations. So some complex datatypes like std::map need their parameters to implement these.

WIth kind regards,

Konrad


这篇关于将代码从VS6迁移到VS2010时出现错误C2248的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆