I'm trying to follow the C++ tutorial at learncpp.com but it doesn't have the steps for Visual Studio Code. I installed the gcc compiler on linux using apt install gcc and tried running the C++17 code on that website with G++ but i keep getting errors. Could you help me out here? is there a setting I need to change in VS code?
Asked
Active
Viewed 1,547 times
1
-
4Does [this](https://stackoverflow.com/questions/49397233/how-to-enable-c17-support-in-vscode-c-extension) help? – Paul Sanders Jun 12 '21 at 23:17
-
1Select cmd-shift P (mac) ctrl-shift-P (windows/linux) and type "C++ Edit". You should be presented with two options: a UI editor and a json editor. Select whichever you're comfortable with. The language level specifier is one of the options, and will update the cpp_properties.json file for the project. – WhozCraig Jun 12 '21 at 23:18
-
@WhozCraig changing `cpp_properties.json` does not help you compiling a C++ program – rioV8 Jun 13 '21 at 01:04
-
1read the docs of VSC about C++ – rioV8 Jun 13 '21 at 01:04
-
@PaulSanders I'll try it out thanks – Bii Jun 15 '21 at 06:53
1 Answers
0
Actually all i needed to do was to make use of compiler arguments which could be set using C++ edit configurations using the vs code command palette.

Bii
- 11
- 2