error C2664: 'CreateThread' : cannot convert parameter 3 from 'int (void *)'
来源:互联网 发布:python支持向量机回归 编辑:程序博客网 时间:2024/05/17 04:30
#include <windows.h>
#include <iostream>
using namespace std;
DWORD WINAPI FunProc(LPVOID)
{
}
int main()
{
}
编译后提示如下错误:
error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned long (__stdcall *)(void *)
提示是第三个参数错了。实际上时最好一个参数错了。
很多人都习惯把最后一个参数设置为NULL。所以出错了。
下面是正确的写法:
#include <windows.h>
#include <iostream>
using namespace std;
DWORD WINAPI FunProc(LPVOID)
{
}
int main()
{
}
- error C2664: 'CreateThread' : cannot convert parameter 3 from 'int (void *)'
- error C2664: 'CreateThread' : cannot convert parameter 3 from 'int (void *)'
- error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned long (__stdcall *)(void *)'
- error C2664: 'RtCreateTimer' : cannot convert parameter 3 from 'int (void *)' to 'void (__stdcall *)(void *)'问题解决办法
- _stdcall的说明及error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' t
- error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned
- error C2664: 'cvSetMouseCallback' : cannot convert parameter 2 from 'void (int,int,int,int,void *)'
- error C2664: 'cvSetMouseCallback' : cannot convert parameter 2 from 'void (__cdecl *)(int,int,int,int)' to 'CvMouseCallback' 的解决
- error C2664: 'cvSetMouseCallback' : cannot convert parameter 2 from 'void (__cdecl *)(int,int,int,int)' to 'CvMouseCallback' 的解决
- (菜鸟级别)解决用VC创建新线程易出的问题error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned long (_
- 用VC创建新线程易出的问题error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned long (__stdcall
- error:error C2664: 'calc' : cannot convert parameter 2 from 'int' to 'int []' Conversion fro
- error C2664: 'LONG CTabCtrl::InsertItem(int,TCITEMW *)' : cannot convert parameter 2 from 'char *' t
- error C2664: 'atof' : cannot convert parameter 1 from 'int' to 'const char *'
- error C2664: 'LONG CTabCtrl::InsertItem(int,TCITEMW *)' : cannot convert parameter 2 from 'char *' t
- error C2664: 'int CListCtrl::InsertColumn(int,LPCTSTR,int,int,int)' : cannot convert parameter 2 from 'const char [7]' to 'LPCTS
- error C2664: 'MessageBoxW' : cannot convert parameter 2 from
- error C2664: 'cvSetMouseCallback' : cannot convert parameter 2 from ....to'CvMouseback'
- 在ACCESS中实现真分页的SQL语句
- 软件架构视图—4+1模式
- 心情继续糟糕
- cout<<格式输出的使用
- android ndk程序UnsatisfiedLinkError解决方案
- error C2664: 'CreateThread' : cannot convert parameter 3 from 'int (void *)'
- 全面分析 Spring 的编程式事务管理及声明式事务管理
- android菜单详解四:子菜单
- c#数据库存取图片的三种方式
- oracle大牛博客
- 也谈Android的学习和利用Android来赚钱
- javascript高级3
- ASP.net 中在子页中使用 CSS 的问题?
- hdoj 1297 打表