|
为方便起见, 包装了一个线程类并用函数 _beginthreadex()创建线程
但却出了 "error C2276: “&” : 绑定成员函数表达式上的非法操作" 的错误
具体函数是(简要函数外型是)
HANDLE m_hHandle;
int m_nThreadID;
HRESULT cXX::Start()
{
m_hHandle = _beginthreadex( NULL, 0, StaticThreadFunc, 0, NULL, &m_nThreadID );
}
unsigned __stdcall cXX::StaticThreadFunc( void* lpParam )
{
// ...
}
其中, 加重的就是错误所在, 求如何解决这个问题 |
|