📄 subject_39178.htm
字号:
<p>
序号:39178 发表者:wuzhang 发表日期:2003-05-08 19:05:55
<br>主题:为什么是这样呢????是什么原因呢???
<br>内容:在编译下面的语句时<BR>void CChainTable::Insert(MsgChain &msg)<BR><BR>{<BR> m_Table.push_back( msg ); 是这里有问题?????<BR>}<BR>总是有下面问题<BR>c:\program files\microsoft visual studio\vc98\include\xmemory(34) : error C2558: struct 'tagMsgChain' : no copy constructor available<BR> c:\program files\microsoft visual studio\vc98\include\xmemory(66) : see reference to function template instantiation 'void __cdecl std::_Construct(struct tagMsgChain *,const struct tagMsgChain &)' being compiled<BR>Error executing cl.exe.
<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-05-08 21:22:28
<br>内容:struct 'tagMsgChain' : no copy constructor available<BR><BR>m_Table是什么东西?vector吗?<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>
回复者:wuzhang 回复日期:2003-05-09 08:12:11
<br>内容:typedef struct tagMsgChain<BR>{<BR> CMyEdit editobj; <BR> CRect rect ; <BR><BR>}MsgChain, *LPMsgChain;<BR><BR> typedef list<MsgChain> Table_t;<BR>void CChainTable::Insert(MsgChain &msg)<BR>{<BR> m_Table.push_back( msg ); //这语句编译是有问题<BR>}<BR>总是有下面问题<BR>c:\program files\microsoft visual studio\vc98\include\xmemory(34) : error C2558: struct 'tagMsgChain' : no copy constructor available<BR> c:\program files\microsoft visual studio\vc98\include\xmemory(66) : see reference to function template instantiation 'void __cdecl std::_Construct(struct tagMsgChain *,const struct tagMsgChain &)' being compiled<BR>Error executing cl.exe.
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:wuzhang 回复日期:2003-05-09 08:15:26
<br>内容:Table_t m_Table
<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-05-09 08:16:54
<br>内容:问题很可能出在<BR>CMyEdit editobj; <BR>CMyEdit是CEdit吧!<BR>如果是的话把它改成CMyEdit* pEditObj;
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:wuzhang 回复日期:2003-05-09 09:33:36
<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>
回复者:wuzhang 回复日期:2003-05-09 16:09:23
<br>内容:为什么运行这两块代码后<BR>{<BR> MsgChain msg ;<BR> memset(&msg, 0, sizeof(MsgChain));<BR> msg.pEditObj = & m_EditObj[m_editobjcount];<BR> msg.Rect = m_FirstRect; 是一个矩形变量<BR> m_ChainTable.Insert ( msg);<BR>}<BR>{<BR> MsgChain msg ;<BR> memset(&msg, 0, sizeof(MsgChain));<BR> msg.pEditObj = & m_EditObj[m_editobjcount]; 是与上面不同的值<BR> msg.Rect = underect; 是一个矩形变量<BR> m_ChainTable.Insert ( msg);<BR>}<BR>size_t nsize =m_ChainTable .Size (); nsize 的值总是1呢??????<BR><BR><BR>size_t Size() const { return m_Table.size(); }
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:wuzhang 回复日期:2003-05-09 17:00:37
<br>内容:size_t nsize =m_ChainTable .Size (); 是两个值<BR>void CMyEdit::OnLButtonDown(UINT nFlags, CPoint point) <BR>{ <BR> CEdit::OnLButtonDown(nFlags, point);<BR> CTestorgView *pView=GetpView();<BR> ASSERT(pView!=NULL);<BR> CChainTable::Table_t ::iterator i;<BR> size_t nsize = pView->m_ChainTable .Size ();<BR> if(pView->m_bAddUnder )<BR> {<BR> for(i =pView->m_ChainTable.m_Table.begin(); //为什么这里只取出第一个<BR> i !=pView->m_ChainTable.m_Table.end(); ///矩形??????<BR> ++i)<BR> {<BR> point.x +=i->Rect .left ;<BR> point.y +=i->Rect .top ;<BR> if(i->Rect.PtInRect(point))<BR> {<BR>// pView->m_editobjcount ++;<BR> pView->DrawUnder (i->Rect );<BR> break;<BR> }<BR> <BR> }<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>
回复者:wuzhang 回复日期:2003-05-09 17:20:01
<br>内容:对啦!!! 忘了break;
<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 + -