Conio.h is an (ancient) Windows and MS-DOS/PC-DOS C library that was, and still is used for very basic, bare-metal keyboard input and handling in a Windows/DOS environment. Both getch and clrscr are non-standard additions by this header, and should be avoided when possible for the standard C functions. No he doesn't. And he doesn't want iostream.h either. What version of Dev-C are you using? I don't remember if the current stable version includes a standards compliant compiler or not, but I.
![C++ conio library C++ conio library](/uploads/1/2/6/1/126140885/483930449.png)
Checks the console for keyboard input.
![Use Conio.h In Dev C++ Use Conio.h In Dev C++](/uploads/1/2/6/1/126140885/446948117.jpg)
Important
This API cannot be used in applications that execute in the Windows Runtime. For more information, see CRT functions not supported in Universal Windows Platform apps.
Syntax
Return Value
_kbhit returns a nonzero value if a key has been pressed. Otherwise, it returns 0.
Remarks
How To Use Math.h In Dev C++
The _kbhit function checks the console for a recent keystroke. If the function returns a nonzero value, a keystroke is waiting in the buffer. The program can then call _getch or _getche to get the keystroke.
By default, this function's global state is scoped to the application. To change this, see Global state in the CRT.
Requirements
Routine | Required header |
---|---|
_kbhit | <conio.h> |
For more compatibility information, see Compatibility.
Libraries
All versions of the C run-time libraries.
Example
Sample Output
Use Conio.h In Dev C Download
See also
Console and Port I/O
WikiProject C/C++ | (Rated Stub-class) | |||||||
---|---|---|---|---|---|---|---|---|
|
List of Functions[edit]
The list of functions is a bit short, and possibly inaccurate, isn't it? See DJGPP conio.h header file for an example of one implementation's listing. I might edit this page, unless someone minds. - J 76.104.101.162 (talk) 18:35, 17 March 2009 (UTC)
I find the page half way helpful. As is explained the member functions vary by compiler. We need to know which compiler this list comes from. And since ANSI have produced a definition we need to be told what their list is. Since that's two lists the table becomes extendable, Then we can all join in with lists from the principal compilers, historic and current. Reg nim (talk) 20:25, 12 August 2010 (UTC). —Preceding unsigned comment added by 1.22.32.21 (talk) 20:25, 29 August 2010 (UTC)
I agree with the two above. I hope to find this list, if necessary I will buy a copy of the standard from ANSI . But the ANSI search finds nothing for 'conio.h' . If anyone knows the number of the standard then please quote it as a reference. Reg nim (talk) 21:22, 24 August 2011 (UTC)
- I don't think you'll find any reference to the relevant ANSI standard, because I don't think conio.h is part of any official ANSI C standard.24.222.2.222 (talk) 13:39, 29 August 2011 (UTC)
- Yes, I think the page contains a hoax. And ANSI deserve it. I will report it to ANSI and see what comes back. Reg nim (talk) 21:11, 30 August 2011 (UTC)
- I think I was in error above, I misread the last line. The C standard referred to must be C89. Does that really impose the an_ requirement. I have two old Borland compilers that were sold as C89 complient, both have conio.h without prefix. All compilers that I know, which is not that many, have no an_ prefix. And where does that leave ISO with C90, which is described as identical in effect to C89. I have seen no reference to an_ anywhere else but here, I have Googled lots of variants to find nothing more than here. I am dubious until someone with a standard gives a definitive answer. — Preceding unsigned comment added by Reg nim (talk • contribs) 19:22, 31 August 2011 (UTC) Sorry Reg nim (talk)
- Agreed on the _ thing. The C standard doesn't prohibit implementations from adding their own headers. It would only be an issue if those identifiers were reserved when conio.h hadn't been included (in which case I'd expect the always-visible names to adopt a __ prefix and conio.h to provide the versions without an underscore). I'm removing it. 2601:646:8200:975D:E543:4A50:C1D4:BD79 (talk) 01:26, 17 June 2016 (UTC)
Su nombre[edit]
La palabra 'conio.h' parece como si fuera espanola? Pues, es un nombre de un archivo que se usa para programar en DOS y Windows, y pienso que su nombre completo es 'Console Input/Output Header File' o quizas no. - J 76.104.101.162 (talk) 18:35, 17 March 2009 (UTC)
Use Conio.h In Dev C 2017
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Talk:Conio.h&oldid=858781968'