Results 1 to 10 of 10

Thread: Map, from iterator to index and viceversa.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Map, from iterator to index and viceversa.

    You can use the function std::distance

    however remember that maps aren't sequential containers
    Last edited by mcosta; 19th April 2011 at 16:39. Reason: updated contents
    A camel can go 14 days without drink,
    I can't!!!

Similar Threads

  1. pointer and iterator
    By mickey in forum General Programming
    Replies: 6
    Last Post: 3rd February 2008, 22:24
  2. QLinkedList iterator
    By ^NyAw^ in forum Qt Programming
    Replies: 8
    Last Post: 18th October 2007, 16:15
  3. iterator
    By mickey in forum General Programming
    Replies: 6
    Last Post: 23rd May 2006, 10:28
  4. ::iterator
    By mickey in forum General Programming
    Replies: 2
    Last Post: 20th March 2006, 22:05
  5. convert iterator
    By mickey in forum General Programming
    Replies: 8
    Last Post: 20th March 2006, 21:59

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.