Guest_imported
New member
- Jan 1, 1970
- 0
I'm programming a threaded class but I can't use non-static class function in my thread.
e.g:
void MyClass::dummy()
{
cout <<"lauched..."<<endl
}
void MyClass::launch_thread()
{
mythread = CreateThread( NULL,0,LPTHREAD_START_ROUTINE) dummy,null,0,&dwThreadId);
}
if "dummy" is declared non-static, the systeme spew out garbage messages like:
"error C2440: 'type cast' : cannot convert from '' to 'unsigned long (__stdcall *)(void *)'"
please help me
dams
e.g:
void MyClass::dummy()
{
cout <<"lauched..."<<endl
}
void MyClass::launch_thread()
{
mythread = CreateThread( NULL,0,LPTHREAD_START_ROUTINE) dummy,null,0,&dwThreadId);
}
if "dummy" is declared non-static, the systeme spew out garbage messages like:
"error C2440: 'type cast' : cannot convert from '' to 'unsigned long (__stdcall *)(void *)'"
please help me
dams