Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > HASH_MAP

Reply
Thread Tools

HASH_MAP

 
 
Jianli Shen
Guest
Posts: n/a
 
      06-04-2005
#include <ext/hash_map>

typedef HASH_MAP<Addr1, Addr2> AddrPair;
typedef HASH_MAP<AddrPair, int> PairCount;
typedef HASH_MAP<Addr1, PairCount> PairMap;

AddrPair addrPair;
PairCount pairCount;
PairMap pairMap;

I just want to use such structure to count the frequent of addrPair.

eg. <<A, B>, 6>
<<A, B1>, 8>
<<A, B2>, 4>
<<A2, C2>, 10>
<<A3, D2>, 16>

Don't know how to define the data structure, the above one don't work well.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hash_map Jon Cosby C++ 10 12-02-2003 12:31 AM
C2143, hash_map Florian Liefers C++ 11 11-12-2003 09:18 PM
hash_map iterator Charles Herman C++ 5 11-04-2003 02:50 AM
Pre-standardizing hash_map & friends. Jacek Generowicz C++ 0 08-26-2003 12:58 PM
2d hash_map iteration ? Kristofer Pettijohn C++ 1 06-26-2003 08:18 AM



Advertisments