+ 1

how to implement "getch" in linux?

getch is a function of nonstandard library conio.h. is there any function instaed of getch in standard libraries? or what is the implementation code for that?

9th Jul 2017, 5:06 PM
Ali IzadiNia
Ali IzadiNia - avatar
4 Respostas
0
I don't use Linux, I'm going to google that ;)
9th Jul 2017, 5:07 PM
Andrés04_ve
Andrés04_ve - avatar
0
thx dear Andres, but endwin cmd on solution1 is bad when we need getch in middle of code(not at the end). solution2 uses termios driver i dont know whether it is part of all linux c comilers or just for some.
9th Jul 2017, 5:26 PM
Ali IzadiNia
Ali IzadiNia - avatar
0
just try it, if termios doesn't run you should find more ways :/
9th Jul 2017, 5:28 PM
Andrés04_ve
Andrés04_ve - avatar