A simple example of multithreading in C++ using pthreads