I wrote a code on windows, using the function getch()
from stdio
. The thing is I have to use an input function that does not require pressing enter.
My code compiles and works perfectly on windows. However, this assignment has to run on linux, and when I try to do so, it tells me it does not recognize getch()
(or _getch()
).
The problem is that according to the assignment, I can not use other includes but stdio.h
(and same goes for adding a flag), so I can not use curses.h
to solve this.
I also can not use termios.h
and so on, we have not learned it.
How can I solve this? Are there any other options?
Thanks