如何創建一個靜態成員函數的線程例行_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