|
From: Daniel G. <sp...@ho...> - 2002-03-31 08:46:24
|
Do you need conio_mingw.h for all these to work? Wouldn't <conio.h> do?
>From: Ricardo López Ruiz <ri...@po...>
>To: dev...@li...
>Subject: [Dev-C++] Re: getch()-getche()
>Date: Thu, 28 Mar 2002 18:39:34 +0100
>
>Finally I have found three different ways
>to implement the reading of a key without pressing RETURN.
>I report them if it can be of help for somebody.
>It works finely on my platform, but as it has been discussed
>in the last days, it is not sure that it runs well
>on other installations of Dev-C++.
>Ricardo.
>
>*******************************************
>#include <iostream>
>#include <conio_mingw.h>
>int main()
>{
> cout << "Enter any key." << endl;
> getch(); //reads a char without return and without echo
> cout << "Enter another key" << endl;
> getche(); // reads a char without return and with echo
> cout << "\n End is coming...Press a key" << endl;
> while(!kbhit()) ; // waits until you press a key
>
> return(0);
>}
>********************************************
>
>
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
|