Suppose I have the following class:
*.h :
class MyClass{
void caller();
int threadProcuder(void *args);
};
*cpp :
void MyClass::caller()
{
pthread_t i;
pthread_create(&i,NULL,(void*(*)(void*))&MyClass::threadProcedure,(void*)this);
}
int MyClass::threadProcedure(void *args)
{
cout << "body of thread" << endl;
}
Unforunately, thread doesn't run.