Hello.
I have a problem with a function. First of all the function:
void __cdecl CallWritingThread(void *);
This function is a member of my class
class CLogSystem
The problem is, when I want to write for example an error to a file, I want to do this by a seperate thread.
So I want to start the new thread with the function which writes this message into this file.
So I start the thread by
_beginthread(*startAdress, stackSize, Param)
The parameter must be a pointer to the thread proc with this notation:
void (*thread)(void *)
As you can see, the function which I posted first, has this structure.
When I write:
_beginthread(CallWritingThread, 0, NULL);
The compiler says:
'CLogSystem::CallWritingThread': function call missing argument list; use '&CLogSystem::CallWritingThread' to create a pointer to member
So I listened to it and wrote this:
_beginthread(&CLogSystem::CallWritingThread, 0, NULL);
But the compiler picked at this code again with that:
'_beginthread' : cannot convert parameter 1 from 'void (__cdecl CLogSystem::* )(void *)' to 'void (__cdecl *)(void *)'
I absolutly don´t know what the compiler want!?
Please help
Alex