I'm trying to run a function named extensionStep
from a class named SVAnchor
in multi threads. i use this code:
rc = pthread_create(&threads[i], NULL, extensionStep, &td[i]);
to call the function and here is the definition of extensionStep
:
void* SVAnchor::extensionStep( void *threadarg)
and i got the following error:
error: cannot convert 'SVAnchor::extensionStep' from type 'void* (SVAnchor::)(void*)' to type 'void* (*)(void*)'
rc = pthread_create(&threads[i], NULL, extensionStep, &td[i]);
^
that shows the problem is converting from type 'void* (SVAnchor::)(void*)' to type 'void* ()(void)'
How to solve this problem?
Thanks all