Let\'s say I have a class such as
class c {
// ...
void *print(void *){ cout << \"Hello\"; }
}
And then I have a vector of c
C++ : How to pass class member function to pthread_create()?
http://thispointer.com/c-how-to-pass-class-member-function-to-pthread_create/
typedef void * (*THREADFUNCPTR)(void *);
class C {
// ...
void *print(void *) { cout << "Hello"; }
}
pthread_create(&threadId, NULL, (THREADFUNCPTR) &C::print, NULL);