+ Reply to Thread
Results 1 to 2 of 2

Thread: What is the difference between set and map?

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    23

    What is the difference between set and map?

    What is the difference between set and map?

    Which container should I use in my application. Which is fast?

  2. #2
    1. set
    a. It is used to store just keys.

    2. map
    a. It is used to store keys and its corresponding values.

    And:
    b. Both of them are associative containers.
    c. They provide find method.

    Use set if you have only key and you want them to be unique.

    Use map if you have unique key and its value associated with it.

    hope this helps.

+ Reply to Thread

Tags for this Thread

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