如何创建一个静态成员函数的线程例行_beginthreadex静态成员函数
class Blah
{
static void WINAPI Start();
};
// ..
// ...
// ....
hThread = (HANDLE)_beginthreadex(NULL, 0, CBlah::Start, NULL, NULL, NULL);
这给了我下面的错误:
***error C2664: '_beginthreadex' : cannot convert parameter 3 from 'void (void)' to 'unsigned int (__stdcall *)(void *)'***
我在做什么错?
+1教人阅读! – xtofl 2009-08-11 12:43:56
谢谢,但我不熟悉func指针:) lemme试试你的解决方案 – akif 2009-08-11 15:42:18
然后这可能会帮助你一些: 函数指针教程 - http://www.newty.de/fpt/index.html – TheUndeadFish 2009-08-11 23:01:26