Explore maps and see examples of applications that benefit from their use.
- [Eduardo] Finally let's look at the map…associative container.…In this demo we'll do pretty much the same…we did for the set associative container;…that is insert some elements…then remove some elements,…and display the whole container.…So in lines four, five and six,…we have the include lines for the header files.…Here we have in line five…include the map header file,…and in line six the unordered_map header file.…
If you see in line 11 I have already declared…the map we will use.…This will be a map of integer keys and string contents.…Recall that map stores pairs…where the first element of the pair is the key…and the second element of the pair is the content.…So this map will be called just that,…this_map.…Next we have temporary variable definitions…for the interface we will build…which is the same we have been working with.…
We will also need a temporary pair…so I will define it here as pair of integer…and string.…I will name it p,…and this object will be the one…we will insert each time to the container.…So let's start with the insertion round.…
- Why the STL is important
- Containers and iterators
- Vectors and lists
- Stacks and dequeues
- Associative containers
Skill Level Advanced
1. The Standard Template Library
2. Vectors and Lists
3. Stacks, Queues, and Deques
4. Associative Containers
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.