Recommended Answers
Jump to Posti would really love to know if there's any other way to get the functionality of getch()(i.e without using getch()) in the above mentioned cases.
The problem with unbuffered input is that it becomes the responsibility of the programmer to handle the buffering. Do you allow the user to make …
Jump to Post>To anyone reading this thread:
You realize the thread is over three years old, yes?>getch() is still available in the conio.h header file (at least in MinGW).
I'm sure it works just fine on your compiler, but because it's non-standard, that means it's not guaranteed to work on …
Jump to Post>void main(){
main returns int. Since you can omit the return statement in C++, using int main on top of being correct and portable actually saves you one keystroke. It's a win-win situation. :)
Jump to Post>Found this thread when googling getch, and I had to respond.
I recommend you resist that temptation next time. Posers should know their limits.>The function you're discussing is NOT a "compiler extension". It's a library function.
If you want to split hairs with terminology, it's a library extension. …
Jump to Post>but you're rude whenever you feel like it
I'm appropriately rude. If you're rude to me, don't expect me to be nice to you.>One of the rules of this forum is "keep it pleasant".
Not only am I quite familiar with the rules, I'm in the unique position …
All 37 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.