这个编译错误问题已经困扰我半个月了,大家帮帮忙啊!
原来是一个C写的SDK程序,我在eMbedded Visual C++4.0中新建了一个类CSerial,然后把C程序中的函数移到了新类中,编译时出错。相关代码:
......
if (hReadThread = CreateThread (NULL, 0, ReadPortThread, 0, 0, &dwThreadID))
......
DWORD WINAPI 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
请问该如何解决?谢谢
上一个相同问题的帖子已结
http://expert.csdn.net/Expert/topic/2162/2162702.xml?temp=.5805017