且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用ubuntu版本在C ++程序中运行字符串功能.....

更新时间:2023-02-25 21:29:09

如前所述 conio.h 是一个特定于编译器套件的头文件介绍通过Turbo C for MS-DOS,后来也被微软用于他们的C编译器。



对于Linux上的类似功能,你可以使用像宣布ncurses 6.0 - GNU项目 - ***软件基金会(FSF) [ ^ ]。



有使用nc实现 conio.h 的项目urses: conio.h的Linux c ++实现SourceForge.net [ ^ ]。



如果您只需要阅读控制台输入,请使用 Ubuntu Manpage:fgetc,fgets,getc,getchar,gets,ungetc - 输入字符和字符串 [ ^ ]。



使用C ++你也可以使用基本输入/输出 - C ++教程 [ ^ ]。
As already mentioned conio.h is a compiler suite specific header file introduced by Turbo C for MS-DOS which has been later adapted also by Microsoft for their C compilers.

For similar functions on Linux you can use a curses library like Announcing ncurses 6.0 - GNU Project - Free Software Foundation (FSF)[^].

There is a project that implements conio.h using ncurses: Linux c++ implementation of conio.h download | SourceForge.net[^].

If you only need to read console input, use Ubuntu Manpage: fgetc, fgets, getc, getchar, gets, ungetc - input of characters and strings[^].

With C++ you can use also use Basic Input/Output - C++ Tutorials[^] which is supported by all compilers.