i am writing a program with threads. it's a simple program in which user will enter how many number of thread he want to be created.
what technique we use to create multiple threads ??
using for loop ???
suppose to run 3 threads...
for(c=0; c<3; c++ ){
pthread_create(&thread[c], NULL, thread_func, NULL);
}
if i use the above case how can i use my thread join statement to wait for all 3 threads???
if (pthread_join(threada[0], NULL) != 0)