Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how do i use kbhit on this online site

–1 vote
asked Mar 25 by oliver (120 points)

1 Answer

0 votes
answered Mar 30 by Peter Minarik (22,320 points)

kbhit is a Microsoft Windows platform specific command. OnlineGDB is running on a Linux server, hence Windows specific functions are not supported.

Instead, you could use "ncurses".

Please, have a look at this: https://stackoverflow.com/questions/4025891/create-a-function-to-check-for-key-press-in-unix-using-ncurses

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...