日期:2014-05-16 浏览次数:20557 次
#include <ext/hash_map> #include <iterator> #define HASHMAP_PREFIX __gnu_cxx using namespace std; using namespace HASHMAP_PREFIX; template<typename Key, typename Value> class CHashMapTemp { public: CHashMapTemp(){} ~CHashMapTemp(){} Value Find(Key k) { //********* 问题所在 HASHMAP_PREFIX::hash_map<Key, Value>::iterator it = m_HashMap.find(k);//问题就出在这行 return (Value)NULL; } private: protected: HASHMAP_PREFIX::hash_map<Key, Value> m_HashMap; };