Possible Duplicate:
How to implement getch() function of C in Linux?
What is the equivalent Linux
version of the conio.h
header file from MS-DOS?
Is there a way to replace its functionality? e.g. getch()
I'm using
gcc
and the text editorGeany
to compileC
code.
This question is related to
c
linux
gcc
header-files
A popular Linux library which has similar functionality would be ncurses.
The original conio.h was implemented by Borland, so its not a part of the C Standard Library nor is defined by POSIX.
But here is an implementation for Linux that uses ncurses to do the job.
That is because is does not exist, since it is bounded to Windows.
Use the standard functions from <stdio.h>
instead, such as getc
The suggested ncurses library is good if you want to write console-based GUIs, but I don't think it is what you want.
Source: Stackoverflow.com