PDA

View Full Version : How to get a string on console applications?



Ali Reza
8th June 2012, 09:12
Hi guys!
How to get a string on console applications?

yeye_olive
8th June 2012, 10:30
If by "get a string" you mean read a string from the standard input, then use std::cin. Keep in mind that the call will block until the input is entered. If you need to keep an event loop running while waiting for the input, you will need another approach, like using the ncurses library or monitoring stdin with QSocketNotifier.