In C, how can i pass more than one argument to a thread?
Normally, I do it in a way like,
pthread_create(&th,NULL,dosomething,(void*)connfd); void
Pack the several values inside a struct on the heap (so malloc it and fill it before), then call pthread_create with a pointer to that struct.
struct
malloc
pthread_create