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

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

    Maps and addresses

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

    GDI+ and Image Maps

    Kevin Vaughn, Jul 11, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    411
    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:
    516
    =?Utf-8?B?SmVmZiBhdCBCZW5uZXQtVGVjLmNvbQ==?=
    Oct 15, 2005
  4. Simon Elliott
    Replies:
    4
    Views:
    1,144
    Simon Elliott
    Mar 10, 2005
  5. Marcus
    Replies:
    2
    Views:
    578
    Marcus
    Dec 9, 2005
Loading...

Share This Page