Does anybody know where I can get some basic source code on the creation and use of threads (I know about threads, just never coded them, and reading up on them, some of the inputs into CreateThread are confusing)?

class myClass
void init();

void WINAPI Thread();

void WINAPI myClass::Thread()
    //do whatever

void init()
   CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Thread, 0, 0, 0);

This is just a quick psuedo for a much larger program. The error I get is ...

error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'LPTHREAD_START_ROUTINE'

This is how i read to start a simple thread, did I do something wrong?


I needed to declare the function, whose address was being passed to the thread, as static, in case anyone has this problem in the future.