Thinking about creating a phone book but confused that which STL container is better choice. Please explain the difference between set and map. Which one is better choice in which scenario.
For example when names and numbers are stored in map then if make names as key then search cannot be done with numbers and vice-versa. So which container/data structure would exactly serve this purpose?