#include #include void *print_message_function( void *ptr ); int main() { pthread_t thread1, thread2; char *message1 = "Hello\n"; char *message2 = "World\n"; pthread_create( &thread1, NULL, print_message_function, (void *)message1 ); pthread_create( &thread2, NULL, print_message_function, (void *)message2 ); cout << "Hi from main." << endl; return 0; } void *print_message_function( void *ptr ) { cout << (char *)ptr; return NULL; }