Maps

Discussion in 'C++' started by Wilson, Feb 6, 2007.

  1. Wilson

    Wilson Guest

    hi,

    i know this is quite a basic question but could you please explain, as
    simply as possible, the purpose of a map in c++ and how it is used,
    thanks

    wilson
     
    Wilson, Feb 6, 2007
    #1
    1. Advertisements

  2. * Wilson:
    >
    > i know this is quite a basic question but could you please explain, as
    > simply as possible, the purpose of a map in c++ and how it is used,


    std::map is a templated container class.

    It maps keys to values.

    For example, (an instance of) std::map<std::string, int> maps strings to
    integers, so it essentially provides a so-called "associative array".

    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is it such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?
     
    Alf P. Steinbach, Feb 6, 2007
    #2
    1. Advertisements

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. c186282

    Maps and addresses

    c186282, Sep 9, 2003, in forum: Perl
    Replies:
    2
    Views:
    834
    c186282
    Sep 10, 2003
  2. Kevin Vaughn

    GDI+ and Image Maps

    Kevin Vaughn, Jul 11, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    575
    Kevin Vaughn
    Jul 11, 2003
  3. Klaus Jensen

    Control to draw maps on images?

    Klaus Jensen, Oct 9, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    603
    =?Utf-8?B?SmVmZiBhdCBCZW5uZXQtVGVjLmNvbQ==?=
    Oct 15, 2005
  4. =?Utf-8?B?anV2aQ==?=

    Vector Graphics - Maps - Microsoft MapPoint

    =?Utf-8?B?anV2aQ==?=, Nov 27, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,433
    clintonG
    Nov 28, 2005
  5. =?Utf-8?B?QmVuIFIu?=

    Roles.IsUserInRole maps call to GetRolesForUser... Why?

    =?Utf-8?B?QmVuIFIu?=, Mar 20, 2006, in forum: ASP .Net
    Replies:
    7
    Views:
    1,163
    Steven Cheng[MSFT]
    Mar 24, 2006
  6. Maps and Hashmaps

    , May 25, 2004, in forum: Java
    Replies:
    2
    Views:
    2,577
    jAnO!
    May 25, 2004
  7. Simon Elliott
    Replies:
    4
    Views:
    1,396
    Simon Elliott
    Mar 10, 2005
  8. Marcus
    Replies:
    2
    Views:
    800
    Marcus
    Dec 9, 2005
Loading...