How do I access data in a STL Map?

This is a discussion on How do I access data in a STL Map? within the C++ Programming forums, part of the General Programming Boards category; I have an iterator (it) pointing into my map<string,Car*>. How do I access my Car* (Car is a class I ...

  1. #1
    Slime Dragoon_42's Avatar
    Join Date
    Feb 2003
    Location
    Vancouver
    Posts
    90

    How do I access data in a STL Map?

    I have an iterator (it) pointing into my map<string,Car*>. How do I access my Car* (Car is a class I created)?

  2. #2
    Slime Dragoon_42's Avatar
    Join Date
    Feb 2003
    Location
    Vancouver
    Posts
    90
    Nevermind, I fugured it out:
    it->second;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Lame null append cause buffer to crash
    By cmoo in forum C Programming
    Replies: 8
    Last Post: 12-29-2008, 03:27 AM
  2. What's best for mass data access?
    By FoodDude in forum C++ Programming
    Replies: 4
    Last Post: 09-22-2005, 08:44 AM
  3. C++...sequential access data files
    By locolobo in forum C++ Programming
    Replies: 1
    Last Post: 12-04-2002, 10:06 AM
  4. Map and Functor :: STL
    By kuphryn in forum C++ Programming
    Replies: 8
    Last Post: 11-26-2002, 12:09 PM
  5. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 07:49 PM

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