I'm trying to use the following:
pthread_create(&searchThread[i], &threadAttribs[i], DoStuff, &ParallelParams[i]);
If DoStuff is static it compiles but then I do not have access to any of the methods or variables that are part of the class that DoStuff is in. But if I keep DoStuff as a non-static method so that I can access everything else in the class I get the following compiler error:
error: argument of type 'void* (MyClass::)(void*)' does not match 'void* ()(void)'
where the error seems to be referring to the DoStuff argument and the fact that it's a member function.
Is there any hope of being able to pass in a non-static method allowing me access to everything in MyClass in my DoStuff method?
Thanks!