Hi , i just forget a simple task in c++ , i want to get a CHAR from
input (a console application) but i remember the simple way like that
u press any KEY on keyboard without any need to press then ENTER after
that , i mean application wait till u press any key then ur ASCII code
of pressed key will return , becouse i want to use arrowKeys for
browsing a menu in my application .
while(ch = getchar())
{ ... }
i used to this style but now it doesnt work , after this GETCHAR()
application waits to insert the CHARACTER and then i have to press
ENTER . :(
what should i do ?
thx in advance ;
C++ simple question?
that's a simple 1.
use getch() and not getchar()
u'll also need to include conio.h for this function..
this should solve ur prob!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment