RE: [Dev-C++] DELETE/SUPR in ANSI C + Get a char without ENTER
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ya...> - 2001-10-04 12:12:26
|
> -----Original Message----- > From: dev...@li...=20 > [mailto:dev...@li...] On Behalf=20 > Of Albert Vilella Bertran > Sent: Thursday, October 04, 2001 11:49 AM > To: DevC MAILING List > Subject: [Dev-C++] DELETE/SUPR in ANSI C + Get a char without ENTER >=20 >=20 > Hello, > I wonder if anybody knows the "ANSI C" way to: >=20 > (1) Allow the use of "delete" key or "supr" key while you are=20 > writing a long word in a scanf() and you mistype a key. I=20 > always get the "[[3~" symbols and so on. You can always use backspace... >=20 > (2) For 1 character scanf, there is any "ANSI C" way to press=20 > the char and not to need to press ENTER then? This feature is system dependend but on PCs the input stream is cached till the ENTER is pressed so although this behavior is not defined by ANSI, you can't. However you can use system extensions like getche() defined in conio.h. >=20 > Thanks, and yes, I'm a beginner! That's the point we all passed from. :) Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys |