一个编译错误,大家帮忙看看
原来是一个C写的SDK程序,我在eVC中新建了一个类CSerial,然后把C程序中的函数移到了新类中,编译时出错。相关代码:
......
if (hReadThread = CreateThread (NULL, 0, ReadPortThread, 0, 0, &dwThreadID))
......
DWORD CSerial::ReadPortThread(LPVOID lpvoid)
{
...
}
出现编译错误:
error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned long (__cdecl *)(void *)'
None of the functions with this name in scope match the target type
请问该如何解决?谢谢