Share on Facebook Share on Twitter Email
Answers.com

Conio.h

 
Wikipedia: Conio.h

conio.h is a header file used in old MS-DOS compilers to create text user interfaces. It is not part of the C programming language, the C standard library, ISO C nor is it required by POSIX.

This header declares several useful library functions for performing "console input and output" from a program. Most C compilers that target DOS, Windows 3.x, Phar Lap, DOSX, OS/2, or Win32[1] have this header and supply the concomitant library functions in the default C library. Most C compilers that target UNIX and Linux do not have this header and do not supply the concomitant library functions. Some embedded systems are using conio-compatible library [2].

The library functions declared by conio.h vary significantly from compiler to compiler. As originally implemented in Microsoft's Visual C++ the various functions mapped directly to the first few DOS int 21h functions. But the library supplied with Turbo C++ and Borland C++ did not use the DOS API but instead accessed video RAM directly for output and used BIOS interrupt calls.

Compilers that targeted non-DOS operating systems, such as Linux, Win32 and OS/2, provided different implementations of these functions.[citation needed]

Contents

Member functions

int kbhit(void) Determines if a keyboard key was pressed.
int ungetch(int c) Puts the character c back into the keyboard buffer.
int getch(void) Reads a character directly from the console without buffer, and without echo.
int getche(void) Reads a character directly from the console without buffer, but with echo.
int _cprintf(const char *format, arg0,... argn) Formats and prints a string directly to the console.
int _cputs(const char *string) Outputs a string directly to the console.
int _cscanf(char *format, arg0,... argn) Reads and formats values directly from the console.

See also

References

External links


Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
 
 

 

Copyrights:

Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Conio.h" Read more