for example in c++,
cin >> t;
How can I input?
For input support, please use below setting (File->Preference->Settings) to run code in Integrated Terminal:
{
"code-runner.runInTerminal": true
}
The current issue with the extension is that , if I run a program which includes a stdin the output window waits for the input and the only way to terminate it is close the application . Under default settings.
This is nice, thanks!
for example in c++,
cin >> t;How can I input?
Two ways:
(1) In setting.json file => add this line-
{
"code-runner.runInTerminal": true
// Other lines...
}
You are done!!
Or
(2) Follow these steps-
Step1. Go to File > Preference > Setting.
Step2. Then on the left panel, scroll and find 'Run Code Configuration'.
Step3. Under that option: keep cursor on "code-runner.runInTerminal" and click on edit icon.
Step4: You will see two true & false option. Make it true.
Step5: You are done!!
"code-runner.runInTerminal": true
👏🏻👏🏻👏🏻
not working in mac.
not working in mac.
it works well on mine mbp
In case you run into issues with a bash error like "bash: cd: too many arguments" then I found this to be a solution in the visual studio code settings for code runner:
"code-runner.executorMap": {
"cpp": "g++ $fileName -o $fileNameWithoutExt.exe && './$fileNameWithoutExt.exe'"
}
for example in c++,
cin >> t;How can I input?
Two ways:
(1) In setting.json file => add this line-
{
"code-runner.runInTerminal": true
// Other lines...
}
You are done!!
Or
(2) Follow these steps-
Step1. Go to File > Preference > Setting.
Step2. Then on the left panel, scroll and find 'Run Code Configuration'.
Step3. Under that option: keep cursor on "code-runner.runInTerminal" and click on edit icon.
Step4: You will see two true & false option. Make it true.
Step5: You are done!!
Thanks Dude ^_^
Most helpful comment
For input support, please use below setting (
File->Preference->Settings) to run code in Integrated Terminal: