Linux下解决conio.h的问题
linux下没有conio.h的头文件,想要实现getch就无法实现,但是有办法可以代替
将windows中的getch();
改编为Linux系统中的:
include<stdio.h>
include <stdlib.h> //(原文没有这句,但是会出现system的警告)
system("stty -echo");
c=getchar();
system("stty echo");
linux下没有conio.h的头文件,想要实现getch就无法实现,但是有办法可以代替
将windows中的getch();
改编为Linux系统中的:
system("stty -echo");
c=getchar();
system("stty echo");