Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

how to detect arrow key inputs in c without using getch of conio.h.

$
0
0

well i am trying to create a game in c which requires the use of arrow keys as input. the book where i came across this question gives a function definition that is required to detect arrow key inputs. but the function given in the book requires the presence of conio.h which i don't have. i am using a virtual machine which runs linux and it doesnt have conio.h in its library. why conio.h is used in the function is because the function uses getch() to detect arrow keys. i am pretty much a beginner in c,so i have 2 questions for you 1. how to make my own user defined function that does not require conio.h so that i can detect arrow keys? 2. how do you add/import header files that your ide doesnt have? how do i add conio.h to my ide?is there any safe/official website where you can get conio.h for free?how to add the downloaded file to my ide?


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>