I using c thread.
I want to using string argument.
in my source
int main(int argc, char **argv){
pthread_t thread[1];
pthread_create(&thread[0], NULL, thread_A, (void *) argv[0]);
pthread_join(thread[0], NULL)
}
void * thread_A(void * arg){
char argv[100] = {0};
strcpy(argv, (char *) arg);
}
when comfile this warning like this
pthread.h:225:12: note: expected 'void * (*)(void *)' but argument is of type 'void * (*)(char **)'
so I use (void *)&argv[0]. but this is error too.
what can I try?
thread_Ais in reality avoid *thread_A(char **data). It has nothing to do with the forth parameter.