gcc 4.1.2 使用 #include 提示不存在

gcc 4.1.2 使用 #include <hash_map> 提示不存在
gcc 4.1.2 使用 #include <hash_map> 提示不存在


 使用 #include <hash_map.h>  又警告我
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.


怎么弄?

LINUX系统 CENTOS 5.6

------解决方案--------------------
看看有<unordered_map>吗?
------解决方案--------------------
警告而已,g++ main.cpp -Wno-deprecated 就可以了。

引用:
gcc 4.1.2 使用 #include <hash_map> 提示不存在


 使用 #include <hash_map.h>  又警告我
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.


怎么弄?

LINUX系统 CENTOS 5.6

------解决方案--------------------
update the gcc to later version
------解决方案--------------------
#include <ext/hash_map> 
------解决方案--------------------
hash_map不是stl的一部分, 因此在不同编译器下实现有差异, 可以试试
#ifdef __GNUC__
#include <ext/hash_map>
#else
#include <hash_map>
#endif


namespace std
{
using namespace __gnu_cxx;
}