CodeRunner设置有很多文章已经写到了
如果coderunner设置之后,还没有解决C++11编译问题,可以尝试本文方法
command/ctl+shift+p 搜索C/C++: Edit Configurations (JSON)
打开Json配置文件,进行如下配置即可
{
"configurations": [
{
"name": "myConfigurationName",
"includePath": ["${workspaceFolder}/**"],
"defines": [],
"compilerPath": "/usr/bin/arm-none-eabi-g++",
"cStandard": "c11",
"cppStandard": "c++11",
"IntelliSenseMode": "gcc-arm"
}
],
"version": 4
}
如果仍然不能编译,在Task.json中配置下C++11
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: clang++ 生成活动文件",
"command": "/usr/bin/clang++",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"-std=c++11"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "调试器生成的任务。"
}
],
"version": "2.0.0"
}
good luck!!!