请各位赐教!!!!!!!

crazzycat 2003-02-17 08:07:02
先面的代码有什么错误吗?
(CWinThread*)m_pThread = (CWinThread*)AfxBeginThread(CInspectorView::CommProc,NULL,THREAD_PRIORITY_NORMAL);

UINT CInspectorView::CommProc(LPVOID)
{
return 0;
}
为什么编译出现如下提示:
D:\mycpp\C++\Tools\Inspector_EditV\InspectorVView.cpp(393) : error C2665: 'AfxBeginThread' : none of the 2 overloads can convert parameter 1 from type 'unsigned int (void *)'
请各位赐教!
...全文
71 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
flycatmei 2003-02-18
  • 打赏
  • 举报
回复
又学一招!!
demetry 2003-02-18
  • 打赏
  • 举报
回复
同意
webycn 2003-02-17
  • 打赏
  • 举报
回复
当然了,全局类型除外.
如果是一个类成员函数,必须是static.
webycn 2003-02-17
  • 打赏
  • 举报
回复
线程函数应该是static类型的.

15,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 进程/线程/DLL
社区管理员
  • 进程/线程/DLL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧