C++ Input Problem

Started by
1 comment, last by Razza2003 21 years, 2 months ago
Hi, im wondering how I can solve a problem ive been having with getting inpu in C++. I want to be able to get input from the keyboard without pausing the program like getch() and cin do. If anyone can help it would be greatly appreciated. Thx.
Advertisement
///////////
char c;
if(kbhit())
c = getch();
/////////////

Check kbhit() before calling getch(). If kbhit() is true, getch will return you a character imediately,
Cool, thanks.

This topic is closed to new replies.

Advertisement