RE: iso C++ and ‘hash_map’ problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi mahmoodn,

> The file has the extension hxx. I searched and some say that hash_map is not stanrad in GCC.

Correct, <hash_map> header is not standard C++, therefore it is not in the standard C++ headers with GCC.

Boost provides a hash map for C++.  <http://www.boost.org/>

The GCC I am using provides a hash map (but I'm not sure if all GCC's provide a hash map):

#include <ext/hash_map>
__gnu_cxx::hash_map<int, int> mymap;

The next standard of C++ will provide a hash map, through <unordered_map> header.  If your GCC is more current than mine, you may have that available to you now.  (You probably need to set -std= correctly.)

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux