ChatSoocket.cpp
f:/mycodes/c++/exp5/ex_chat/ex_chatdlg.h(14) : fatal error C1083: Cannot open include file: 'ChatSocket.h': No such file or directory
Ex_Chat.cpp
解决方法:为Ex_Chat工程添加新类时CChatSocket时误写成CChatSoocket了,从头开始改,把写错的纠正。
Ex_ChatDlg.cpp
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(124) : error C2065: 'm_comboType' : undeclared identifier
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(124) : error C2228: left of '.AddString' must have class/struct/union type(控件IDC_COMBO_YPPE的控件变量忘了没加)
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(125) : error C2228: left of '.AddString' must have class/struct/union type
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(126) : error C2228: left of '.SetCurSel' must have class/struct/union type
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(128) : error C2039: 'm_pDlg' : is not a member of 'CChatSocket'(为CChatSocket类添加一个公有型CEx_CHatDlg指针变量*m_pDlg.)
f:/mycodes/c++/exp5/ex_chat/chatsocket.h(16) : see declaration of 'CChatSocket'
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(129) : error C2065: 'm_saClient' : undeclared identifier(.m_saClient改成m_asClient)
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(129) : error C2228: left of '.m_pDlg' must have class/struct/union type
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(186) : error C2228: left of '.GetCurSel' must have class/struct/union type
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(187) : error C2065: 'nIndex' : undeclared identifier(定义时错写成nIndx,改正)
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(189) : error C2228: left of '.GetLBText' must have class/struct/union type
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(195) : error C2065: 'm_bServe' : undeclared identifier
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(218) : error C2556: 'void __thiscall CEx_ChatDlg::OnAccept(void)' : overloaded function differs only by return type from 'int __thiscall CEx_ChatDlg::OnAccept(void)'
f:/mycodes/c++/exp5/ex_chat/ex_chatdlg.h(22) : see declaration of 'OnAccept'
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(218) : error C2371: 'OnAccept' : redefinition; different basic types
f:/mycodes/c++/exp5/ex_chat/ex_chatdlg.h(22) : see declaration of 'OnAccept'
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(221) : error C2065: 'IDC_EDIT_SEND' : undeclared identifier
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(221) : error C2227: left of '->EnableWindow' must point to class/struct/union
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(227) : error C2556: 'void __thiscall CEx_ChatDlg::OnReceive(void)' : overloaded function differs only by return type from 'int __thiscall CEx_ChatDlg::OnReceive(void)'
f:/mycodes/c++/exp5/ex_chat/ex_chatdlg.h(21) : see declaration of 'OnReceive'
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(227) : error C2371: 'OnReceive' : redefinition; different basic types
f:/mycodes/c++/exp5/ex_chat/ex_chatdlg.h(21) : see declaration of 'OnReceive'
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(252) : error C2556: 'void __thiscall CEx_ChatDlg::OnConnect(void)' : overloaded function differs only by return type from 'int __thiscall CEx_ChatDlg::OnConnect(void)'
f:/mycodes/c++/exp5/ex_chat/ex_chatdlg.h(20) : see declaration of 'OnConnect'
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(252) : error C2371: 'OnConnect' : redefinition; different basic types
f:/mycodes/c++/exp5/ex_chat/ex_chatdlg.h(20) : see declaration of 'OnConnect'
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(252) : error C2333: 'OnConnect' : error in function declaration; skipping function body
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(258) : error C2556: 'void __thiscall CEx_ChatDlg::DoClose(void)' : overloaded function differs only by return type from 'int __thiscall CEx_ChatDlg::DoClose(void)'
f:/mycodes/c++/exp5/ex_chat/ex_chatdlg.h(19) : see declaration of 'DoClose'
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(258) : error C2371: 'DoClose' : redefinition; different basic types
f:/mycodes/c++/exp5/ex_chat/ex_chatdlg.h(19) : see declaration of 'DoClose'
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(258) : error C2333: 'DoClose' : error in function declaration; skipping function body
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(264) : error C2601: 'OnButtonRun' : local function definitions are illegal
F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(317) : fatal error C1075: end of file found before the left brace '{' at 'F:/mycodes/C++/exp5/Ex_Chat/Ex_ChatDlg.cpp(264)' was matched(符号不匹配。漏了一个}加上去。)
解决方法:1.控件IDC_COMBO_YPPE的控件变量忘了没加。
2.为CChatSocket类添加一个公有型CEx_CHatDlg指针变量*m_pDlg.
3.m_saClient改成m_asClient
4.定义时错写成nIndx,改正。
5.符号不匹配。漏了一个}加上去。
MFC exp5
最新推荐文章于 2018-07-03 09:26:13 发布