AW: [Dev-C++] character input without keyboard echo
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Kluck, S. <Ste...@Dr...> - 2001-02-28 20:58:38
|
That works great, Ioannis!
Thank you very much,
Stephan
Stephan Kluck
> Advance Bank AG
> Gesch=E4ftsfeld: Dresdner Direktservice
> DV-Systeme
> email: Ste...@Dr...=20
> voice: +49 (0) 203 3047-2474
> fax: +49 (0) 203 3047-3555
>=20
Bitte haben Sie Verst=E4ndnis, dass diese E-Mail keinen =
rechtsverbindlichen
Charakter hat.
Please note that this email is not legally binding.
> -----Urspr=FCngliche Nachricht-----
> Von: Ioannis Vranos [SMTP:no...@ya...]
> Gesendet am: Mittwoch, 28. Februar 2001 21:45
> An: dev...@li...
> Betreff: RE: [Dev-C++] character input without keyboard echo
>=20
> He speaks about getch() declared in conio.h . getch() does not belong =
to
> the
> standard C but is a platform extension. Use it in this way:
>=20
> #include <conio.h>
>=20
> int main()
> {
> char c=3Dgetch();
>=20
> }
>=20
> I saw that in Dev-C++ it has output to the screen where usually in =
other
> compilers it does not. The only thing which is 100% is that standard =
C
> does
> not provide you with input function from keyboard which has no =
"feedback"
> on
> thee screen. Also about the thing i told before about fclose(stdout); =
was
> a
> mistake.
> Here is a solution for your case on Dev-C++ (and probably working in =
many
> others Windows C/C++ compilers):
>=20
> #include <stdio.h>
> #include <conio.h>
>=20
> char clean_getch(void)
> {
> char c=3Dgetche();
> printf("\b \b");
>=20
> return c;
> }
>=20
>=20
> Ioannis
>=20
> * Ioannis Vranos
> * Programming pages: http://members.nbci.com/noicys
> * Alternative URL: http://run.to/noicys
>=20
>=20
>=20
> > -----Original Message-----
> > From: dev...@li...
> > [mailto:dev...@li...]On Behalf Of
> > Kluck, Stefan
> > Sent: Wednesday, February 28, 2001 9:42 PM
> > To: 'dev...@li...'
> > Subject: AW: [Dev-C++] character input without keyboard echo
> >
> >
> > tried getch(), but *does* echo to the screen (Dev-C++ 4.01, Windows =
NT
> 4.0
> > SP5)
> > :-(
> >
> > Stephan
>=20
>=20
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|