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.
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).
-
Make sure you have Microsoft’s C/C++ Extension installed into Visual Studio Code.
-
Open the extension’s settings, for example by right-clicking on the extension and then selecting “Extension Settings”.
- That will bring up a new tab called “Settings” with a search bar.
- Add “cppStandard” to the search terms in the search bar.
- 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.