Transversing Maps

This is a discussion on Transversing Maps within the C++ Programming forums, part of the General Programming Boards category; std::map<string,BigAbstractDatatype> SortedByName; std::map<int,BigAbstractDatatype> SortedByNumber; ok i have a big ol complicated map all ready for me to work with, how ...

  1. #1
    0x7f
    Guest

    Transversing Maps

    std::map<string,BigAbstractDatatype> SortedByName;
    std::map<int,BigAbstractDatatype> SortedByNumber;

    ok i have a big ol complicated map all ready for me to work with, how can i transverse it like any other sexy STL container class? obviously its an associative container, but can i do iterator math with it? iterator bla bla bla <200 characters later> bla bla IT;
    IT = some member of a map, IT++;? once i have a map how can i just loop through and do something to every member.


    =/

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,676
    Sure.

    gg

  3. #3
    0x7f
    Guest
    works great, thanks alot. ya i expected it to not print out duplicate records, but i dont suppose there is a way to retrieve duplicates is there? o well just thought id ask.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Loading maps
    By divineleft in forum C++ Programming
    Replies: 1
    Last Post: 07-05-2006, 10:09 AM
  2. Hash_map, STL maps query
    By alvifarooq in forum C++ Programming
    Replies: 15
    Last Post: 06-07-2005, 09:07 AM
  3. DDX/DDV and Message Maps
    By axr0284 in forum Windows Programming
    Replies: 2
    Last Post: 01-07-2005, 07:55 AM
  4. maps as reference?
    By robquigley in forum C++ Programming
    Replies: 2
    Last Post: 11-26-2003, 08:12 AM
  5. Finding terrain maps...
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 09-25-2001, 07:44 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21