   Console IO At the Same Time
  I have seen it done but not sure how, I want to be reading data from the console and write text to the console at the same time. If you don't know what I mean think of a console chat program, you could be typing a message into the console while you are recieving text from other connected clients. I have tried this using multiple threads but all that happens is that the IO gets all cluttered.   
  You don't need threads for this, you just need a way to communicate with the IO devices (e.g. the console and the chat server socket) in a non-blocking fashion. If you tell us what language and platform you are using, it would make it easier to help.   ;  Oh sorry, forgot that part.I am using C++ and the STL streams (cout/cin). As a test I tried making one thread that printed Hello World\n every 1000milliseconds, and another thread that just runs cin and then prints whatever is inputed. But when I type for instance helloeveryone this happens- Output - Hello WorldhelHello WorldloeHelo WorldverHello WorldyoneHello WorldhelloeveryoneHello WorldAs seen the output goes right over what im typing   ;  Playing with the console is fun; here's some links that explain some of the things you can do:Win32 Console Applications - Part 1Benryves' Windows Console tutorialsUsing the Console - MSDNBasically, you move around the 'cursor' where you draw at.You draw text being typed at a location in the console, say, at cell 2, 2 (2nd cell from the top, and 2nd from the left), but you then move the cursor and draw your other text at another location, like cell 10, 5.   ;Quote:Original post by Servant of the LordPlaying with the console is fun; here's some links that explain some of the things you can do:Win32 Console Applications - Part 1Benryves' Windows Console tutorialsUsing the Console - MSDNBasically, you move around the 'cursor' where you draw at.You draw text being typed at a location in the console, say, at cell 2, 2 (2nd cell from the top, and 2nd from the left), but you then move the cursor and draw your other text at another location, like cell 10, 5.There's also (n)curses, which is basically the UNIX equivalent and is also fun.NCURSES Programming HOWTO - The definitive tutorial.Public Domain Curses - Ports of the curses library for Windows.   