我试图检测一个按键来确定用户是否想再次播放,但msvcrt.getch()只是不适合我。这是我的代码: import msvcrt
#the game here
print "Do you want to continue? Y/N"
if msvcrt.getch() == 'Y' or msvcrt.getch() == 'y':
print"Let's pl
我已经在Linux mint中安装了ncurses库,但我仍然不能在c中使用getch函数。我正在使用Linux mint 18.2。 这里是我的程序: #include <stdio.h>
#include <curses.h>
int main() {
char k;
printf("how are you");
k = getch();
pri