the following code generates error and i can't figure out why:
Code:
class ModuleManager_c
{ protected:
HANDLE hInputThread, hOutputThread;
DWORD dwInputThread, dwOutputThread;
void OutputThread(){}
void InputThread() {}
public:
ModuleManager_c(){}
~ModuleManager_c(){}
void status() {}
void start(char ** argv)
{
hInputThread = CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)
InputThread, (LPVOID) argv[0], NULL, &dwInputThread);
}
};
yet if i put
Code:
void InputThread() {}
line outside the class it works.
Compiler output:
Code:
\server\main.cpp In member function `void ModuleManager_c::start(char**)':
\server\main.cpp argument of type `void (ModuleManager_c::)()' does not match `DWORD (*)(void*)'
\server\Makefile.win [Build Error] [main.o] Error 1