Is there any standard function in gcc that is equivalent to getch() so that I can read the input without hitting enter key?
niyasc
-3
Light Poster
Recommended Answers
Jump to PostI assume you're using a Linux system and not MinGW because MinGW's gcc supports getch(). You can reproduce the effect of getch() on Linux like this.
Jump to PostSince
getch()
is not and never has been part of the language definition, you should consider not using it at all.The link claims the conio.h is deprecated. It is not deprecated. It has never been defined by C nor C++. It's simply an add-on header extremely few compilers …
All 6 Replies
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
Arch Stanton
commented:
On Linux, using gcc 4.4.5; getch() works for me!
+0
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Arch Stanton
13
Newbie Poster
jaybhanderi
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.