system("stty raw"); // 使终端驱动处于一次一字符模式
key = getchar();
system("stty cooked");// 使终端驱动回到一次一行模式
如何不按回车就接受一个字符输入
最新推荐文章于 2022-06-17 18:39:15 发布
system("stty raw"); // 使终端驱动处于一次一字符模式
key = getchar();
system("stty cooked");// 使终端驱动回到一次一行模式