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.

What's a good getkey function to use?

0 votes
asked Jul 14, 2020 by ZX228 (400 points)

1 Answer

+1 vote
answered Jul 14, 2020 by Peter Minarik (86,040 points)
selected Jul 27, 2020 by ZX228
 
Best answer

What language are we talking about (Online GDB supports multiple languages).
 

If it's C, have a look at this: https://stackoverflow.com/questions/20349585/c-library-function-to-check-the-keypress-from-keyboard-in-linux

Most of the time, this is done via some platform-dependent library as the C standard doesn't have a proper key hit detection defined (the closest one is reading one character --getchar --  from the stdin)

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.
...