Is there a way to pass data from one running thread to another running thread. One of the threads shows a menu and the user selects one option using cin. The other thread is processing the data and sending the result to a server each 'X' period of time. As I can wait the whole program in the cin instruction waiting for the user to input the data, I divided the program into two threads. The data input of the menu is used in the other thread.
Thanks