getch is in the conio.h i know, works perfectly well on windows, but on linux no no, iv seen others do functions for this in order to work in linux. How do u do this is my question, i just wnt to make it work on linux
Printable View
getch is in the conio.h i know, works perfectly well on windows, but on linux no no, iv seen others do functions for this in order to work in linux. How do u do this is my question, i just wnt to make it work on linux
Write it yourself. getch() is not part of any of the C standards therefore no compiler has to include it. When it doubt google how to do such a thing. Or just use ncurses or something.
http://faq.cprogramming.com/cgi-bin/...&id=1043284385
scroll to the end.
Or if you want fancy terminal "graphics", then look at ncurses library, which also has a key input function which works in a similar manner.
Wow... I never noticed that. Though its been many moons since I last read the FAQ, thanks Salem.