-
//第一种,直接包含在源程序文件中,如第一行代码所示 #pragma GCC diagnostic error "-std=c++11" #include <iostream> using namespace std; int main() { int a = 1; int b = 2; float c = 3.14; auto i = a + b; auto j = a + c; cout << j << endl; cout << i << endl; } //第二种方法,可以直接取别名方法 如下所示: alias g++='g++ -std=c++11' g++ hello.cpp -o hello
在linux下运行关于c++11时报错——linux中g++支持C++11的方法
最新推荐文章于 2021-07-01 19:32:58 发布