Home  >  Article  >  Development Tools  >  What should I do if the vscode console cannot input?

What should I do if the vscode console cannot input?

藏色散人
藏色散人Original
2019-11-14 09:53:1713928browse

What should I do if the vscode console cannot input?

What should I do if the vscode console cannot input?

The problem that the VS Code console cannot be input

I recently wanted to briefly review the previous C stuff. Since I am using a Mac environment, I can only install VS Code. This is my first time using it. I’m still not used to it, so I wanted to do a simple input test. The code is as follows

#include <iostream>
using namespace std;
int main(){
char name[50];
cout << "请输入您的名称: ";
cin >> name;
cout << "您的名称是: " << name << endl;
return 0;
}

When I was about to input, it prompted “Cannot edit in read-only editor”, but I suddenly felt that it was no longer possible. , I started Google, but there were no results. Maybe the problem was too simple!

What should I do if the vscode console cannot input?

Go to the code-runner official website and take a look:

What should I do if the vscode console cannot input?

It means whether to integrate with the terminal, settings, Enter runInTerminal, the result is as shown below:

What should I do if the vscode console cannot input?

After opening settings.json, it will be as follows:

What should I do if the vscode console cannot input?

This should be fine .

If it still doesn’t work, search directly in the plug-in bar: Run in Terminal, and it will be fine after installation

What should I do if the vscode console cannot input?

The above is the detailed content of What should I do if the vscode console cannot input?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn