- Joined
- Oct 8, 2006
- Messages
- 3
- Reaction score
- 0
the main program:
----------------------------------------------
include <hash_map>
template<class A, class B>
class HashMapTest
{
public:
typedef hash_map<A, B> hashMap; //fine!!
typedef hash_map<A, B>::const_iterator hashMapIter;
/*GNU g++ compiler complains the hash_map<std::string, std::string>::const_iterator is not derived from class HashMapTest. Don't know what it exactly means... */
};
--------------------------------------------------
I really dont know what is wrong with the const iterator for hash_map. Can anyone correct this code fragment?
I am kinda stuck here...
Thanks in advance.
----------------------------------------------
include <hash_map>
template<class A, class B>
class HashMapTest
{
public:
typedef hash_map<A, B> hashMap; //fine!!
typedef hash_map<A, B>::const_iterator hashMapIter;
/*GNU g++ compiler complains the hash_map<std::string, std::string>::const_iterator is not derived from class HashMapTest. Don't know what it exactly means... */
};
--------------------------------------------------
I really dont know what is wrong with the const iterator for hash_map. Can anyone correct this code fragment?
I am kinda stuck here...
Thanks in advance.
Last edited: