当前位置:   article > 正文

vscode 使用c++11_vscode 检查c++11

vscode 检查c++11

原由

vscode 想使用c++11标准,在运行的时候自动加上 -std=c++11

但是在tasks.json文件中的args添加 -std=c++11 没有用。

终于在设置里 搜索code run (前提安装了Code Runner 扩展)

1.找到
Code-runner:Executor Map
Set the executor of each language.
在setting.json中编辑

2.点击在setting.json中编辑打开此setting.json,ctrl +F搜索 cpp,终于看到在终端运行的这个命令了。

3.添加-std=c++11即可。

"cpp": "cd $dir && g++ -std=c++11 $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt ",
  • 1
声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号