简体   繁体   English

如何修改 Code Runner 的默认命令行以包含 g++ -std=c++11?

[英]How to Modify Code Runner's Default Command Line to Include g++ -std=c++11?

I recently tried running some code on VS Code but, as I'm using C++11 Standard code, I have to manually change the execution code in terminal to g++ -std=c++11 to actually run the code without errors.我最近尝试在 VS 代码上运行一些代码,但由于我使用的是 C++11 标准代码,我必须手动将终端中的执行代码更改为g++ -std=c++11才能实际运行代码而不会出错。

I'm using Code Runner v0.11.8 by Jun Han我正在使用Jun Han 的 Code Runner v0.11.8

How can I set this option as the default?如何将此选项设置为默认值?

On this page there is a Configuration section in which you have example how to specify compilation for c language.在这个页面上有一个配置部分,您可以在其中示例如何为 c 语言指定编译。 Write your own for C++ with flags you need and I think that it will be enough.用你需要的标志为 C++ 写你自己的,我认为这就足够了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM