|
-
July 14th, 2004 04:04 AM
#11
Originally posted here by cgkanchi
AFAIK, getch() and getche() aren't ANSI C functions. Therefore, you are not guaranteed that they will work. I know for a fact that it doesn't work on gcc and that it works on Turbo/Borland C++.
getch() and getche() (and some other console functions) are included in conio.h. But yes, they aren't ANSI C functions. And conio.h doesn't come with (original) gcc. However, MinGW port of gcc (and Dev-CPP and cygwin's gcc which uses MinGW) does have conio.h header file.
So if you have C code which uses getch() or getche() that works on Turbo/Borland C++ or VC++, just do #include <conio.h>, and it will work on MinGW and Dev-CPP.
Peace always,
<jdenny>
Always listen to experts. They\'ll tell you what can\'t be done and why. Then go and do it. -- Robert Heinlein
I\'m basically a very lazy person who likes to get credit for things other people actually do. -- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks