MFC exp5

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.符号不匹配。漏了一个}加上去。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值