dev cpp 多线程
很奇怪的错误,真是摸不着头脑
// start server thread
unsigned threadID;
HANDLE hServer = _beginthreadex(
NULL, // default security attributes
0, // defautl stack size: 1M
ServerThread, // thread function addr
NULL, // thread function parameter addr
0, // create flags
&threadID); // thread identifier
编译提示最后一个参数类型不对: invalid conversion from `long unsigned int ' to `void* '
可是_beginthreadex最后一个参数就是unsigned 类型啊?
Dev-C++ version 4.9.9.2
[解决办法]
long unsigned threadID;
这样看看
[解决办法]
(void *)&threadID
[解决办法]
&threadID
==》
(void *)&threadID 强制类型转化一下
have a try ~