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,
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM