namespace std {
template <>
class hash<nGram>{
public :
size_t operator()( const nGram &k ) const
{
return k.m_hashval;
}
};
};
I know I need to add a namespace in somewhere. BUt I don't know where or how. I am very new to this.
Error message : specialization of 'template struct std::tr1::hash' in different namespace ?/?/gcc/V4.1.2/bin/../lib/gcc/sparc-sun-solaris2.10/4.1.2/../../../../include/c++/4.1.2/tr1/functional1:1101: error : from definition of 'template struct std:tr1::hash'
std::tr1
, one isstd
– billz