问题描述
MS-DOS中conio.h
头文件的等效Linux
版本是什么?
What is the equivalent Linux
version of the conio.h
header file from MS-DOS?
是否可以替换其功能? 例如getch()
Is there a way to replace its functionality? e.g. getch()
推荐答案
conio.h
是C
头文件,在旧的MS-DOS编译器中用于创建文本用户界面.针对非DOS操作系统(例如Linux,Win32和OS/2)的编译器提供了这些功能的不同实现.
conio.h
is a C
header file used in old MS-DOS compilers to create text user interfaces. Compilers that targeted non-DOS operating systems, such as Linux, Win32 and OS/2, provided different implementations of these functions.
#include <curses.h>
将为您提供conio.h
首先需要安装Nucurses
nucurses need to be installed at the first place
在基于Deb的发行版中使用
In deb based Distros use
sudo apt-get install libncurses5-dev libncursesw5-dev
在基于rpm的发行版中使用
And in rpm based distros use
sudo yum install ncurses-devel ncurses
对于getch()
类功能,您可以尝试此
For getch()
class of functions, you can try this
这篇关于< conio.h>在哪里? Linux上的头文件?为什么找不到< conio.h> ;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!