Design Pattern Examples
Overview of object-oriented design patterns
helpers/checkforkey.h File Reference

Declaration of the checkforkey() function for determining if a key has been pressed. More...

#include <stdbool.h>
Include dependency graph for helpers/checkforkey.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __CHECKFORKEY_H__
 

Functions

bool checkforkey (void)
 Determine if a key has been pressed on the keyboard.
 

Detailed Description

Declaration of the checkforkey() function for determining if a key has been pressed.

Definition in file helpers/checkforkey.h.

Macro Definition Documentation

◆ __CHECKFORKEY_H__

#define __CHECKFORKEY_H__

Definition at line 7 of file helpers/checkforkey.h.

Function Documentation

◆ checkforkey()

bool checkforkey ( void  )

Determine if a key has been pressed on the keyboard.

Returns
Returns true if a key has been pressed; otherwise, returns false.

Determine if a key has been pressed on the keyboard.

Returns
Returns true if a key has been pressed; otherwise, returns false. Call readkey() to get the actual key.

Definition at line 39 of file checkforkey.c.

References kbhit().

Referenced by Flyweight_Exercise().