#include #include #include using namespace std; string message; void* annoying_function(void * param){ while(1){ cout << message << endl; sleep(1); } return 0; } int main(){ pthread_t thread_handle; pthread_create(&thread_handle, 0, annoying_function, 0); while(1){ cout << "Enter a message that you think will be annoying" << endl; cin >> message; } }