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

📄 subject_56699.htm

📁 vc
💻 HTM
字号:
<p>
序号:56699 发表者:丁丁当当 发表日期:2003-10-20 11:02:26
<br>主题:DEClARE_SERIAL是什么意思
<br>内容:我的:<BR>class CShape : public CObject<BR>{<BR>//&nbsp;&nbsp;&nbsp;&nbsp;DEClARE_SERIAL(CShape)<BR>public:<BR>&nbsp;&nbsp;&nbsp;&nbsp;CShape();<BR>//&nbsp;&nbsp;&nbsp;&nbsp;DEClARE_SERIAL(CShape)<BR>&nbsp;&nbsp;&nbsp;&nbsp;virtual ~CShape();<BR><BR>};<BR><BR>放在那两个地方都说少分号,可系统自己生成的类中都是这样的呀,例如:<BR>class CChildFrame : public CMDIChildWnd<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;DECLARE_DYNCREATE(CChildFrame)<BR>public:<BR>&nbsp;&nbsp;&nbsp;&nbsp;CChildFrame();<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-10-20 11:29:16
<br>内容:在.CPP文件中加入include &#34;stdafx.h&#34;<BR><BR>#include &#34;MyClass.h&#34;<BR><BR>IMPLEMENT_SERIAL( CMyClass, CObject, VERSIONABLE_SCHEMA | 2 )<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>
回复者:丁丁当当 回复日期:2003-10-20 16:33:14
<br>内容: <BR>还是不行,好多错误:<BR> error C2143: syntax error : missing ';' before 'public'<BR> error C2039: 'CreateObject' : is not a member of 'CShape'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; see declaration of 'CShape'<BR> error C2509: '_GetBaseClass' : member function not declared in 'CShape'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; see declaration of 'CShape'<BR> error C2039: 'classCShape' : is not a member of 'CShape'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; see declaration of 'CShape'<BR> error C2039: 'CreateObject' : is not a member of 'CShape'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; see declaration of 'CShape'<BR> error C2509: 'GetRuntimeClass' : member function not declared in 'CShape'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; see declaration of 'CShape'<BR> error C2039: 'classCShape' : is not a member of 'CShape'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; see declaration of 'CShape'<BR> error C2039: 'classCShape' : is not a member of 'CShape'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; see declaration of 'CShape'<BR>Error executing cl.exe.<BR><BR><BR><BR><BR><BR>其中的 public CObject 是我自己加的,不是用向导生成的,问题会不会出在这里呢?<BR><BR>可是添加新类的向导的基类选项中没有CObject呀?<BR><BR><BR>2003-10-20 16:42:42

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -