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
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.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Wow... I never noticed that. Though its been many moons since I last read the FAQ, thanks Salem.