Vishal Chauhan
Vishal Chauhan

Reputation: 11

vscode windows: cannot open output file test.exe: Permission denied

enter image description here

I tried to run the basic C++ code on vscode I get as error:

Error: cannot open output file test.exe: Permission denied.

I am able to run Python code on VS Code but facing issue with C++ code only.

Upvotes: 1

Views: 4223

Answers (2)

Trương Quang Chứ
Trương Quang Chứ

Reputation: 21

It's because you didn't terminate the running test.exe. Open Task Manager , then search for test.exe ( order by name to find it easier) and terminate it.

Upvotes: 2

Aaditya Shah
Aaditya Shah

Reputation: 115

Restarting(Rebooting) the entire system helps for me. Still haven't find anything that causes this error, might be ending "main.exe" task in task manager details tab will help.

Upvotes: 0

Related Questions