J
Jianli Shen
to count the frequence of each pair like <A,B> <A2,C2> in the following.
eg. <<A, B>, 6>
<<A, B1>, 8>
<<A, B2>, 4>
<<A2, C2>, 10>
<<A3, D2>, 16>
I try to use
typedef std:air<long, long> AddrPair;
typedef HASH_MAP<AddrPair,int> PairCount;
AddrPair addrPair;
PariCount pairCount;
then use it like:
addrPair.first = 100;
addrPair.sencond = 200; //upto here it compiles ok.
PairCount::iterator pit=pairCount.find(addrPair);
it complains like:
no match for call to '(const __gnu_cxx::hash<std:air<PAddr, PAddr> >)
(const std:air<PAddr, PAddr>&)'
Does anybody know what's wrong here, or any suggestion to build a data
structure to solve the problem?
Thanks.
eg. <<A, B>, 6>
<<A, B1>, 8>
<<A, B2>, 4>
<<A2, C2>, 10>
<<A3, D2>, 16>
I try to use
typedef std:air<long, long> AddrPair;
typedef HASH_MAP<AddrPair,int> PairCount;
AddrPair addrPair;
PariCount pairCount;
then use it like:
addrPair.first = 100;
addrPair.sencond = 200; //upto here it compiles ok.
PairCount::iterator pit=pairCount.find(addrPair);
it complains like:
no match for call to '(const __gnu_cxx::hash<std:air<PAddr, PAddr> >)
(const std:air<PAddr, PAddr>&)'
Does anybody know what's wrong here, or any suggestion to build a data
structure to solve the problem?
Thanks.