Design Pattern Examples
Overview of object-oriented design patterns
readkey.c File Reference

Implementation of the readkey() function, a blocking read for a key from the keyboard. More...

#include <stdio.h>
#include "readkey.h"
Include dependency graph for readkey.c:

Go to the source code of this file.

Functions

int readkey (void)
 Read a key from the keyboard, blocking if no key is pressed. Use the checkforkey() function to see if a key has been pressed.
 

Detailed Description

Implementation of the readkey() function, a blocking read for a key from the keyboard.

Definition in file readkey.c.

Function Documentation

◆ readkey()

int readkey ( void  )

Read a key from the keyboard, blocking if no key is pressed. Use the checkforkey() function to see if a key has been pressed.

Returns
Returns the ASCII for the key pressed.

Definition at line 14 of file readkey.c.

Referenced by Flyweight_Exercise().