📄 subject_64120.htm
字号:
<p>
序号:64120 发表者:sunice 发表日期:2003-12-08 23:08:07
<br>主题:单文档程序的一个小问题
<br>内容:成生一个当文档程序,当在 MainFrm.cpp 文件中包含头文件 ***View.h 时便会出错,这是什么原因?<BR>Compiling...<BR>MainFrm.cpp<BR>e:\mfc\test\testview.h(21) : error C2143: syntax error : missing ';' before '*'<BR>e:\mfc\test\testview.h(21) : error C2501: 'CTestDoc' : missing storage-class or type specifiers<BR>e:\mfc\test\testview.h(21) : error C2501: 'GetDocument' : missing storage-class or type specifiers<BR>Error executing cl.exe.<BR><BR>MainFrm.obj - 3 error(s), 0 warning(s)<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>回复者:红苹果 回复日期:2003-12-08 23:51:22
<br>内容:<BR>你把顺序调整一下试试,如下便可:<BR><BR>#include "stdafx.h"<BR>#include "xxxApp.h"<BR>#include "MainFrm.h"<BR>#include "xxxDoc.h"<BR>#include "xxxView.h"<BR><BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:sunice 回复日期:2003-12-09 10:08:24
<br>内容:原来我没有包含***View.h时没有包含***Doc.h, 现在在***View.h前面加上***Doc.h就正确了!
<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 + -