I've seen this question asked on many forums, but nobody seems to have a definite answer.
Question:
"How does the programmer get keyboard input without waiting for the 'enter' key to be pressed?"
This question is sometimes re-phrased to:
"How can I get key-presses in real-time?"
Can someone please answer either of these questions?
There's a LOT of people who would appreciate an answer.
The only c++ keyboard input information that seems readily available (in abundance) to the public is through use of cin or cin.get(). This is unfortunate because many programs that are created rely on real-time keyboard input. (from games to text editors)
On some forums people recommended the use of other libraries. I believe that the standard libraries should have some function(s) for real-time key input, because it's so important. That lead me to ask the questions here where knowledge about the standard libraries is so abundant, in the hopes that someone more knowledgeable than myself would know the answer.
The standard libraries were created in such a way that the programmer would never have to know anything about the OS their program is running on. Having functions to get real-time input (OS specific) would break that philosophy. If you want cross-platform real-time input (among other things), check out some 3rd party libraries like SFML (games, http://www.sfml-dev.org/ ) or QT (GUI's, http://qt.nokia.com/products/ ). There are many more libraries out there, Google is your friend.