打印

= getche()函数的问题 =

= getche()函数的问题 =

#include<stdio.h>
#include<conio.h>

int
main()
{   char a;
     a=getche();
     return;
}

这段代码可以在VC中编译成功,但是在Linux中的Gcc下会失败.

原因为:
1-   Linux下没有conio.h这个库文件.
2-   Linux下没有getche()这个函数.

那么我怎样在Linux中实现本帖开头那段代码相同功能的源代码呢?

请达人指教.
真爱生命,远离博客 http://fedora.yo2.cn/

TOP

http://www.linuxfans.org/nuke/modules.php?name=Forums&file=viewtopic&t=61929&highlight=getche
上天保佑我的家人健康幸福!

TOP