更改cpp_properties.json
最关键的一点,"cppStandard": "C++11".
launch.json
tasks.json
{
"tasks": [
{
"type": "shell",
"label": "g++ build active file",
"command": "/usr/bin/g++",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"-std=c++11",
"-lpthread"
],
"options": {
"cwd": "/usr/bin"
}
}
],
"version": "2.0.0"
}
