⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_38875.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:38875 发表者:一只爱跳的青蛙 发表日期:2003-05-06 18:28:58
<br>主题:一个编译错误?
<br>内容:我自己定义了一个CQuestion::CObject,然后定义typedef CTypedPtrList &lt;CObject, CQuestion *&gt; CQuestionList,而且我在stdafx.h中包含了#include &lt;afxtempl.h&gt;<BR><BR>编译时出现这样的错误:<BR>d:\program files\microsoft visual studio\vc98\mfc\include\afxtempl.h(1566) : error C2664: '__thiscall CObject::CObject(const class CObject &amp;)' : cannot convert parameter 1 from 'int' to 'const class CObject &amp;'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reason: cannot convert from 'int' to 'const class CObject'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No constructor could take the source type, or constructor overload resolution was ambiguous<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;d:\program files\microsoft visual studio\vc98\mfc\include\afxtempl.h(1566) : while compiling class-template member function '__thiscall _CTypedPtrList&lt;class CObject,class CQuestion *&gt;::_CTypedPtrList&lt;class CObject,class CQuestion *&gt;(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 &lt;CObject, CQuestion *&gt; 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 + -