Alternative function for _kbhit in C++?

365 Views Asked by At

I am currently trying to develop a simple snake game on ios. The tutorial requires me to use however this does not work on my mac. What would be an alternative for _kbhit ? I am new to c++ so would appreciate any help!

1

There are 1 best solutions below

3
On

There is none. You'll have to use a library (like PDCurses or similar) to abstract that from your code or make the platform dependent implementation yourself.