Class Test{ int value; static void* thread_func(void* args){ value++; } void newthread(){ pthread_create(&thread_func,...); }
Let thread_func take a pointer to an object of the class as argument.
static void* thread_func(void* pThis) { static_cast(pThis)->value++; }
In case, this method wants to take some other information as well, put both in another struct/class and pass that in.
struct/class