如果是低版本的要分别安装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;
}