[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
how to create thread to exec member fn of a class
Hi all,
Is it possible to create a thread to execute the member function of a class?
pthread_create(&tid, NULL, A.x, (void*) arg);
on compilation results in the warning:
warning: converting from 'void*(A::*)(void*)' to 'void*(*)(void*)'
Although the program runs and thread is created, how to get rid of this
warning?
Summing up, how to type cast a pointer to a member function of a
class to a pointer to a global function?
-Gaurav.