visual studio code(vscode) 配置在terminal进行运行代码并且支持c++11特性
1.点击设置
点击CodeRunner的小齿轮,点击configure extension settings
2.点击映射
点击executor map中的Edit in settings.json
3.粘贴代码
粘贴如下代码,按下command + s 进行保存
{
"code-runner.runInTerminal": true,
"C_Cpp.default.cppStandard": "c++11",
"code-runner.executorMap": {
"cpp": "cd $dir && g++ $fileName -o $fileNameWithoutExt -std=c++11 && $dir$fileNameWithoutExt"
},
"files.associations": {
"typeinfo": "cpp"
},
"window.zoomLevel": 1,
}