您的位置首页生活百科

编译错误:This file requires compiler and ..

编译错误:This file requires compiler and ..

的有关信息介绍如下:

编译错误:This file requires compiler and ..

新手使用codeblock写c++代码,编译程序时常会出现标题所示错误。这是由于c++程序中array数组的使用需要用ISO C++ 2011 standard的编译器,程序才能正常编译,下面步骤教大家如何正确设置编译器解决这一问题。

点击菜单栏中settings按钮,选择complier功能

在compilersettings > compiler flags > Have g++ follow the C++11 ISO C++ language standard [-std=c++11]后面打勾

点击ok确认

rebuild程序

运行程序

完美!