Borland C++ reference

getche

raw OCR

Gets character from the keyboard, echoes to screen.

Defined in header <conio.h>

Syntax

#include <conio.h>
int getche(void);

Portability

DOSUNIXWindowsANSI CC++ only
■

Remarks

getche reads a single character jfrom the keyboard and echoes it to the current text window, using direct video or BIOS.

Return value

getche returns the character read from the keyboard.

See also

Example

#include <stdio.h>
#include <conio.h>

int main(void)
{
   char ch; •
   printf ("Input a character:");
   ch = getche ();
   printf ("\nYou input a '%c'\n", ch);
   return 0;

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.