环境CentOS G++没有装或却没有更新 如图所示: yum -y update gcc yum -y install gcc+ gcc-c++ 最后重新编译simpledemo.cpp文件,编译后的的文件为simpledemo,运行simpledemo 如下图