更新时间:2023-10-17 15:38:58
conio.h
是一个 C 头文件,与旧的 MS-DOS 编译器一起用于创建文本用户界面.针对其他操作系统(例如基于 Linux、32 位 Windows 和 OS/2)的编译器通过其他头文件和库提供等效功能.
conio.h
is a C header file used with old MS-DOS compilers to create text user interfaces. Compilers that target other operating systems, such as Linux-based, 32-bit Windows and OS/2, provide equivalent functionality through other header files and libraries.
#include <curses.h>
将为您提供 conio.h
提供的几乎所有功能.
The #include <curses.h>
will give you almost all of the functionality provided by conio.h
.
诅咒"首先需要安装.
如果您使用 Apt 包管理器:
If you use the Apt package manager:
sudo apt-get install libncurses5-dev libncursesw5-dev
如果你使用rpm
:
sudo yum install ncurses-devel ncurses
对于 getch
,请查看 NCURSES Programming HOWTO" 文章.
For getch
, take a look at the "NCURSES Programming HOWTO" article.