vscode 加上c++11编译选项

问题描述

vscode 运行C++11代码出现此错误
error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
提示我们需要在编译命令中加一行选项,加入c++11编译选项

解决方法

我们点击右上角小齿轮,进入到task.json配置文件中,在args中添加配置,如下图所示

"-std=c++11"

vscode 加上c++11编译选项_第1张图片

你可能感兴趣的:(解决方法,vscode,c++,ide)