Is there a possibility to use cin parallel to cout?
问题 I'm trying to write a program in C++ which will be responsible for simulating blinkers in cars. I want it to be simple and to compile it in a console window. Is it possible to create one thread for input which will be always active and second for output that will run simultaneously? I wanted to use threads to solve this but it doesn't work as I would like. I have a little trouble to understand threads. If anyone could help me to fix this I would be grateful. int in() { int i; cout<<"press 1