getCh
 
Syntax

inr getCh ( );

Description


getCh() will return a single character (0-255) if one is available in the input buffer.

If no character is available then -1 is returned.

This routine unlike getStr returns immediately whether a character is available or not.

Example

while (1) {
    ch = getCh();
    if (ch != -1) break;
}  
 
See also