Could someone please explain to me the return type of pthread_create( )'s 3rd parameter? I know it should be a function but I keep getting the error: argument of type 'void' (Test::)(void*) ' does not match 'void * (*) (void*)'.
Here is the function that I pass to pthread_create( ):
And this is how I call pthread_create( ):
Here is the function that I pass to pthread_create( ):
Code:
void * Test::run(void * arg)
{ cout << "Running...";
}
Code:
pthread_create(&aThread,NULL,run,NULL);
Comment