I am using Visual Studio Code V 1.31.1. I used an input function but I can't write an input in output panel it shows this error
Cannot edit in read-only editor.
Please help me solve this problem.
I am using Visual Studio Code V 1.31.1. I used an input function but I can't write an input in output panel it shows this error
Cannot edit in read-only editor.
Please help me solve this problem.
I received this error during a code compare with previous version and it wasn't letting me edit the current version in the Right-Window. Unrelated to what I suspect OP's issue but this was the first thread that came up for my search and the error was the same. anyway...
My issue was that the particular file was 'Staged' in my source control at the time. This appears to restrict editing by opening an 'index' version for the compare.
Solution: Un-stage the file, and reopen the comparative window.
For Mac users, it is Code > Preference > Settings.
If you can't find where to find code runner as said in Ali NoumSali Traore's answer, here's what you got to do:
I received the same error like @jgritten. Just like the comment before me by @jgritten, I 'unstaged' and reopened vscode and the files. Now I 'staged' it again. The error "Cannot edit in read-only editor" didnt come.
Hope this reassures anyone who might have similar error after staging the file using git in vscode.
As the @Jordan Stefanelli answer: If you encounter the same problem as me that the integrated Terminal cannot read input from user as below hanging (env. Windows 10)
then the input output are normal
also you can enable "external console" option to solve it:)
Had the same problem. Here’s what I did & it got me the results I wanted.
xx.cpp
"g++ xx.cpp -o a.out
(creates an executable)./a.out