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

📄 subject_21373.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:21373 发表者:萧马 发表日期:2002-11-16 17:37:03
<br>主题:问题,奇怪问题!^_^
<br>内容:建立一个单文档程序,除了从ClassWard中New一个基类为CTreeView的类以外,没有进行任何操作,却出现如下问题:<BR>--------------------Configuration: Test - Win32 Debug--------------------<BR>Compiling...<BR>MyView.cpp<BR>d:\test\myview.h(14) : error C2504: 'CTreeView' : base class undefined<BR>D:\Test\MyView.cpp(17) : error C2440: 'return' : cannot convert from 'class CMyView *' to 'class CObject *'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast<BR>D:\Test\MyView.cpp(17) : error C2653: 'CTreeView' : is not a class or namespace name<BR>D:\Test\MyView.cpp(17) : error C2065: 'classCTreeView' : undeclared identifier<BR>D:\Test\MyView.cpp(28) : error C2653: 'CTreeView' : is not a class or namespace name<BR>D:\Test\MyView.cpp(39) : error C2065: 'GetDocument' : undeclared identifier<BR>D:\Test\MyView.cpp(39) : error C2440: 'initializing' : cannot convert from 'int' to 'class CDocument *'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast<BR>D:\Test\MyView.cpp(49) : error C2653: 'CTreeView' : is not a class or namespace name<BR>D:\Test\MyView.cpp(54) : error C2653: 'CTreeView' : is not a class or namespace name<BR>Error executing cl.exe.<BR><BR>Test.exe - 9 error(s), 0 warning(s)<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>回复者:似水流年 回复日期:2002-11-16 17:56:28
<br>内容:你应在前面加上:<BR>#include &lt;afxcview.h&gt;
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:萧马 回复日期:2002-11-16 18:23:57
<br>内容:拜谢,能否告知原由?
<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 + -