HASH_MAP

Discussion in 'C++' started by Jianli Shen, Jun 4, 2005.

  1. Jianli Shen

    Jianli Shen Guest

    #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.
     
    Jianli Shen, Jun 4, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kristofer Pettijohn

    2d hash_map iteration ?

    Kristofer Pettijohn, Jun 26, 2003, in forum: C++
    Replies:
    1
    Views:
    1,009
    Rob Williscroft
    Jun 26, 2003
  2. Jacek Generowicz

    Pre-standardizing hash_map & friends.

    Jacek Generowicz, Aug 26, 2003, in forum: C++
    Replies:
    0
    Views:
    371
    Jacek Generowicz
    Aug 26, 2003
  3. Charles Herman

    hash_map iterator

    Charles Herman, Nov 3, 2003, in forum: C++
    Replies:
    5
    Views:
    6,035
    Ron Natalie
    Nov 4, 2003
  4. Florian Liefers

    C2143, hash_map

    Florian Liefers, Nov 12, 2003, in forum: C++
    Replies:
    11
    Views:
    1,359
    Dan Cernat
    Nov 12, 2003
  5. Jon Cosby

    hash_map

    Jon Cosby, Nov 30, 2003, in forum: C++
    Replies:
    10
    Views:
    8,675
    David Fisher
    Dec 2, 2003
Loading...

Share This Page