8

https://code.visualstudio.com/docs/cpp/config-msvc

I'm trying to use VS Code to compile and run c++ using these instructions. While completing this step

Start typing "C/C++" and then choose Edit Configurations from the list of suggestions. VS Code creates a file called c_cpp_properties.json in the .vscode subfolder and populates it with some default settings.

I can't get the c_cpp_properties.json file to open and I get the error:

Failed to create "c:\Windows\System32\projects\helloworld\.vscode": EPERM: operation not permitted, mkdir 'c:\Windows\System32\projects\helloworld\.vscode'
Ryan Marr
  • 93
  • 1
  • 1
  • 4

2 Answers2

9

Generally, c_cpp_properties.json should be found by

  1. Pressing Control+Shift+P
  2. Searching for c/c++ edit configuration.
montonero
  • 598
  • 3
  • 10
Amin
  • 91
  • 3
  • 3
    note: doing this the first time will actually create a local `c_cpp_properties.json` under your workspace's vscode folder, namely `.vscode/c_cpp_properties.json` – jxramos Oct 09 '19 at 21:49
  • note: The C/C++ plugin from microsoft must be installed to find "c/c++ edit configurations" – SiGa Jun 28 '22 at 11:13
1

You probably have no permissions. Your options include running VSCode as admin or changing folder permissions. But why do you store projects in system32 in the first place? The best solution would be to move it to some other place, where user has write access without admin rights, like Documents.

p0358
  • 36
  • 2