【发布时间】:2010-09-23 13:14:29
【问题描述】:
这是我的代码:
typedef std::hash_multimap<Vertice<VerticeType, WeightType>*, Edge<VerticeType, WeightType>*> ght;
std::pair<ght::iterator, ght::iterator> getEdgesFromVertice(Vertice<VerticeType, WeightType>*);
当我尝试编译它时,它给了我一个错误提示:
error: type/value mismatch at argument 1 in template parameter list for ‘template<class _T1, class _T2> struct std::pair’
error: expected a type, got ‘__gnu_cxx::hash_multimap::iterator’
但是,std::hash_multimap::iterator 不是类型吗?我在网上看到的所有示例都对std::hash_multimap<T1, T2>::equal_range(key)的返回类型使用相同的表示法
感谢任何帮助。谢谢:)
【问题讨论】:
-
旁注:单数为顶点,复数为顶点或顶点。