I'm trying to create a thread for running some tasks. I copied the code from an old console application (which compiles fine), but can't figure out why it's not working now. I have searched for the error code and came across this suggestion: "Are you passing the name of a member function as a parameter accidentally?" :-O


void operateIt(void *);


void Lift::operate(int aCurrentFloor) {
	//start thread that looks at the queue and moves between floors
	_beginthread(operateIt, 5, &aCurrentFloor);

void Lift::operateIt(void * arg) {

	int s = *( (int*) arg );

   		//do magic


IntelliSense: argument of type "void (Lift::*)(void *arg)" is incompatible with parameter of type "void (__cdecl *)(void *)"

error C3867: 'Lift::operateIt': function call missing argument list; use '&Lift::operateIt' to create a pointer to member	c:\users\alex\documents\visual studio 2010\projects\proiectsctr\proiectsctr\lift.cpp	20

Any help is appreciated.

Edit: the problem has been fixed after declaring the operateIt method static.