Hi,
I 'd like to pass a class member function to pthread_create which is called by another class member function of the same class.
But gcc will give error:Code:class A{ public: void * func1(void *parm); void func2(); }; void A::func2(){ ... pthread_create(threads, NULL, & func1, (void *)(parm)); ... }
How to fix this error? Thanks!error: ISO C++ forbids taking the address of an unqualified or parenthesized non-static member function to form a pointer to member function.



LinkBack URL
About LinkBacks




CornedBee