|
From: Brian M. <str...@ho...> - 2002-03-22 21:58:44
|
I have tried Ioannis's code and it works just fine.
This is the exact code I have in my source file, and it works:
#include <conio.h>
#include <iostream>
void main() {
std::cout << "Enter any key.";
getch();
}
It does not wait for a RETURN to capture a single keystroke. Like Ioannis
pointed out at the end of his email, you might need a specific version of
the MingW compiler (you'd have to check his email again if you haven't
already deleted it, because i deleted it and i can't remember). The
compiler i use works with it just fine. I use Microsoft Visual C++ 5.0
(yeah, yeah, i know, traitor to the cause...) and getch() works when used
this way.
>From: Ricardo López Ruiz <ri...@po...>
>To: dev...@li...
>Subject: [Dev-C++] Re: getch(), getche()
>Date: Fri, 22 Mar 2002 18:05:46 +0100
>
>strange,
>but Ioannis' code only works in my
>Dev-C++ installation if I change
>#include <conio.h> by
>#include <conio.c>, and finally,
>the functions getch() and getche()
>are waiting to strike RETURN to
>read the characters... (¿?),
>and I think this is the same problem
>thta Daniel was pointed out.
>
>some other help about this point ??.
>Ricardo.
>
>
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
|