stackoverflowuser2010
stackoverflowuser2010

Reputation: 40859

How to change Visual Studio Code C++ version through the GUI?

I'm using C++ with Visual Studio Code. How do I change the C++ version (e.g. C++11, C++14, or other standard version) using the Visual Studio Code GUI? I don't want to mess around with JSON setting files.

Upvotes: 0

Views: 2323

Answers (1)

stackoverflowuser2010
stackoverflowuser2010

Reputation: 40859

Here's how you can change the C++ version in Visual Studio Code with the GUI. I am using a Mac with Visual Studio Code v1.60 (2021).

  1. Make sure you have Microsoft's C/C++ Extension installed into Visual Studio Code.

  2. Open the extension's settings, for example by right-clicking on the extension and then selecting "Extension Settings".

enter image description here

  1. That will bring up a new tab called "Settings" with a search bar.

enter image description here

  1. Add "cppStandard" to the search terms in the search bar.

enter image description here

  1. That will filter the settings. Find a setting called C_Cpp > Default: Cpp Standard. Use the drop-down menu to select what version of C++ you want.

enter image description here

Upvotes: 0

Related Questions