What is the INKEY$ equivalent in C programming lan

2019-08-08 12:20发布

I am a beginner in C programming language but I have knowledge of programming in QBasic. I make lots of small programs in Qbasic to solve my basic tasks and I am recently rewriting those programs into C .

While rewriting one of the programs I stumbled upon a problem where the computer would be able to get input but without pausing the program execution. Unfortunately, scanf would cause the program to wait until the user presses any key and presses enter but I need my program run and still be able to get input.

1条回答
我想做一个坏孩纸
2楼-- · 2019-08-08 12:48

On windows the easiest way is kbhit

查看更多
登录 后发表回答