Reputation: 395
I am trying to set up my c++ environment in Visual Code Studio but the error here is Permission denied and I tried giving it administrator permission but it didn't work out.
This is the code :
#include<iostream>
using namespace std;
int main()
{
cout<<"Hello World";
return 0;
}
This is the error
PS D:\Work\VS Code\C++> cd "d:\Work\VS Code\C++\" ; if ($?) { g++ 1.cpp -o 1 } ; if ($?) { .\1 }
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot open output file 1.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
Upvotes: 1
Views: 250
Reputation: 100
I solved it by removing all of "tasks.json" content and going to Terminal->Configure Default Build task then I selected
Upvotes: 1