I want to pass char array to pthread_create but i am confused that how to use that array inside the thread function .... coz that function takes pointer to that array .. not the array.
void thread_function(void *clientNum, void* cp)
{
char localArray[30]={'\0'};
// How can i copy the value of cp in localArray??
}
int main()
{
// some code
char client[30]; client="abc";
char ipArr[30]; ipArr="cde";
iret = pthread_create( &thread[clientNum], NULL, thread_function, (void*) client[clientNum],(void*) ipArr);
if(iret!=0)
{
printf("Thread not created");
iret=1;
}
// some code
}