以判断键盘输入程序为例
#include<stdio.h>
#include<conio.h>
int main (void){
printf("输入字母a");
char ch = 'a';
while(ch != getch());
printf("输入正确");
return 0;
}
右键rucode
编译成功,但是不能写入内容。
解决:
将代码段 code-runner.runInTerminal": true,放入sttings.json中。(记得ctrl+s保存)再次运行
右键-点击 stop code run 终止之前的程序。再次运行。
运行后能够跳转到终端框内运行,并且可以识别输入。