Alternative to GetChar();

I'm trying to find a way witouth using getchar() to escape a fonction. Much like an emergency exist.

Exemple:
1
2
3
4
for(;;)
{
Somethingisgoingonhere();
}


The goal would be if escape (ESC) is pressed, the whatever I am missing would break the for and get out. (and the for could still go until said ESC is pressed)

Anyone know a easy way of doing that?
Last edited on
Topic archived. No new replies allowed.