Hello,
I am still unfamiliar with some aspects with C++ programming and have a question:
I was looking at some code that is part of a test suite where there was a function:
void *a_thread_func()
{
pthread_exit(0);
return NULL;
}
what exactly does this ( "void *a_thread_func()" ) mean??
It is being used for invoking threads in the following line:
pthread_create(&new_th, &new_attr, a_thread_func, NULL);
I have included/attached the code and the header (only 2 files), but when I compile this code I get an error of :
"Passing 'void * (*) () ' as argument 3 of 'pthread_create(pthread_t *, const pthread_attr_t *, void (*)(void*), void *)'
I was wondering if I need to cast something, although I am not sure what to do??
I thank in advance for any help that can be provided. It is appreciated