首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

这些异常如何解决

2012-04-18 
这些错误怎么解决?1comm.cpp1commDlg.cpp1.\commDlg.cpp(80) : error C2562: CcommDlg::OnBnClickedBu

这些错误怎么解决?
1>comm.cpp
1>commDlg.cpp
1>.\commDlg.cpp(80) : error C2562: 'CcommDlg::OnBnClickedButton1' : 'void' function returning a value
1> f:\create工作\工作文件\comtest\wincecom\comm\comm\commDlg.h(31) : see declaration of 'CcommDlg::OnBnClickedButton1'
1>.\commDlg.cpp(124) : error C2228: left of '.GetLength' must have class/struct/union
1> type is 'HANDLE'
1>.\commDlg.cpp(126) : error C2228: left of '.GetAt' must have class/struct/union
1> type is 'HANDLE'
1>.\commDlg.cpp(128) : error C2228: left of '.GetLength' must have class/struct/union
1> type is 'HANDLE'
1>Generating Code...
1>Build log was saved at "file://f:\Create工作\工作文件\comtest\wincecom\comm\comm\TE6410 Board (ARMV4I)\Debug\BuildLog.htm"
1>comm - 4 error(s), 11 warning(s)

[解决办法]
OnBnClickedButton1。。。这个函数中有return的地方都直接改为
return;
[解决办法]
error C2562 'void' function returning a value
这个去掉函数中的return,或者这样写 return;

其他的错误要看你的代码了,现在看来是你用HANDLE类型的变量来引用其函数,这是不对的,handle不是类
看你用的函数,应该是CString的变量才行

热点排行