如果是低版本的要分别安装gcc和g++,命令是:
yum install gcc-c++
yum install gcc
#include <iostream>
using namespace std;
int main()
{
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900)
cout << "C++11 is supported";
#else
cout << "C++11 is not supported";
#endif
cout << endl;
return 0;
}

本文介绍如何通过代码检查系统是否支持C++11,并提供了在低版本系统中分别安装gcc和g++的方法。
277

被折叠的 条评论
为什么被折叠?



