centos 编译C++出现问题(error: ‘shared_ptr’ is not a member of ‘std’ )
1、cmake编译C++程序,出现错误:error: ‘shared_ptr’ is not a member of ‘std’
解决:在CMakeLists.txt中修改,增加 -std=c++0x;在头文件增加#include<memory>
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -std=c++0x")
#include <memory>