I am using pthread.h in a *.cc file. when I try to use pthread_exit(0); or pthread_join(mythrds[yy],NULL); it says:
pthread.h
*.cc
pthread_exit(0);
pthread_join(mythrds[yy],NULL);
You might try using the -pthread option to g++.
-pthread Adds support for multithreading with the pthreads library. This option sets flags for both the preprocessor and linker.