I use Code Runner installed in VS Code to run my C++ code, but it just can't run in c++11 style so it always appears c++11 errors and warnings, how can i do to make it available to c++ 11 ?
Asked
Active
Viewed 804 times
-2
-
How did you verify that the errors and warnings do not occur simply because the code you try to run contains syntax errors etc? Can you run a confirmed error-free HelloWorld? – Yunnosch Mar 03 '20 at 06:07
1 Answers
0
For enabling C++11 on coderunner(vscode) please check if the setting has it enabled.
Go to
Settings > User Settings
In here, search for
Run Code Configuration:
In the menu find: "code-runner.executorMap"
Then edit the setting by adding it to User Setting as below for C++11 support:
"cpp": "cd $dir && g++ -std=c++11 $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt"
Hope this helps !
For more help check this

Paul
- 448
- 1
- 6
- 14