📄 subject_38875.htm
字号:
<p>
序号:38875 发表者:一只爱跳的青蛙 发表日期:2003-05-06 18:28:58
<br>主题:一个编译错误?
<br>内容:我自己定义了一个CQuestion::CObject,然后定义typedef CTypedPtrList <CObject, CQuestion *> CQuestionList,而且我在stdafx.h中包含了#include <afxtempl.h><BR><BR>编译时出现这样的错误:<BR>d:\program files\microsoft visual studio\vc98\mfc\include\afxtempl.h(1566) : error C2664: '__thiscall CObject::CObject(const class CObject &)' : cannot convert parameter 1 from 'int' to 'const class CObject &'<BR> Reason: cannot convert from 'int' to 'const class CObject'<BR> No constructor could take the source type, or constructor overload resolution was ambiguous<BR> d:\program files\microsoft visual studio\vc98\mfc\include\afxtempl.h(1566) : while compiling class-template member function '__thiscall _CTypedPtrList<class CObject,class CQuestion *>::_CTypedPtrList<class CObject,class CQuestion *>(int)'<BR><BR>请问各位大虾,是什么地方出现了错误<BR>
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:tiger_bai 回复日期:2003-05-07 10:37:44
<br>内容:typedef CTypedPtrList <CObject, CQuestion *> CQuestionList定义有问题
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -