I used google trying to find what is the easy way to implement the ubiquitous "Hit any key to continue." in a "console" app (I'm using Visual Studio 2010 atm).
I found the answer above, thank you DCX2. Here is the 2010 version of the answer:
http://msdn.microsoft.com/en-us/library/58w7c94c.aspx
Microsoft: "Use the ISO C++ conformant _kbhit"
(You have do do something like:
while( !_kbhit() );
)
Could you please state the passage in the C++ Standard that claims _kbhit()
is in any way compliant. Include a link to the copy of the C++ Standard you used.
Just because M$ has implemented _kbhit()
does not mean any other compiler has. Please list a few compilers that also include _kbhit()
in their runtime library.
And _kbhit()
inputs nothing. It cannot implement a "press any key" in any way. To claim it does only adds to the ignorance of the previous posts made about it.
[o.t. rant]
Since this thread has already been thoroughly trashed by people more concerned with showing how much smarter they are than the other poster [implicitly bringing themselves down to their level]...
Including yourself with even more incorrect information... :icon_rolleyes:
... I must address a particularly irksome point:
> "It's generally considered rude to resurrect ancient threads, for any reason."
NO! To anyone who says that, please stop it already!!!
I have been reading the Internet since about 1987. That general idea about posting to "old" threads being bad has to be one of the most ignorant ones I have run across in twenty five years... Ugh.
[/o.t. rant]
Since this is your first post here, you are treading on a long-established tradition. If you have nothing new to add to the discussion, resurrecting a thread is frowned upon. Each site has it's own rules and regulations. The "Internet" does not make any rules what-so-ever in this regard. Only someone ignorant about the site in question would make a statement as you have. And to complain about the rules of the site that have been in place for years in his first post he must be pretty full of himself.