
#include
#include
#include
int main()
{
char ch;
printf("input:");
while (1)
{
if (kbhit())
{
if (getch()=='#') break;
ch=getche();
printf("\noutput:%c\n",ch);
printf("input:");
}
}
return 0;
}
为什们每次输入都需要键盘上点两次才会有回应呢?
当然要两次啊
if (getch()=='#') break;
ch=getche();
第一个getch取一胡洞次 第二吵如个getche再取裤碰枯一次不是两次?