Explain the difference between a map and a set
belongs to book: C++ Primer|Stanley B.Lippman, Josee Lajoie, Barbara E.Moo|5th Edition| Chapter number:11| Question number:5
All Answers
total answers (1)
belongs to book: C++ Primer|Stanley B.Lippman, Josee Lajoie, Barbara E.Moo|5th Edition| Chapter number:11| Question number:5
total answers (1)
A
`map`is a collection of key-value pairs. When we want a container acting like dictionary, we should choose`map`.A
`set`is a collection of keys. When we want to check if some values are present, we can choose`set`.
need an explanation for this answer? contact us directly to get an explanation for this answer