Map in C++
C++ Maps. Maps are a collection of key value pairs. Each key is mapped to a value. Keys must be unique in a map, while values do not have to be unique.
For example, a dictionary is a map (as named in Python), as the keys would be vocabulary words, and the values would be definitions/meanings.
In this video you will learn how to add and update a key value pair, iterate through the key value pairs in the map, and remove key value pairs from the map. You will also learn about the unordered_map, and multimap. A C++ map is in sorted order, whereas in other languages, a map may not be sorted.
If you need to review these topics:
Pair: • C++ Pair
Set: • C++ Set, Unordered Set, Multiset
Iterator: • C++ Iterators
Vector: • C++ Vectors and Dynamic Arrays
C++ Playlist:
• C++ Tutorial
Install C++ with VS Code:
• How to set up C++ in Visual Studio Code
Subscribe for more coding tutorials 😄!
Other Videos By Kenny Yip Coding
2025-03-10 | Python Class Variables |
2025-03-09 | Sorting Classes in Python |
2025-03-08 | Python Dunder Methods mul vs rmul |
2025-03-07 | Practice Dunder Methods in Python |
2025-03-06 | Python Classes Dunder Methods and Polymorphism |
2025-03-05 | Design a Credit Card Class (Python Object Oriented Programming) |
2025-03-04 | Python Classes, Methods, and Objects |
2025-02-26 | Build a Calculator in Python |
2025-02-21 | C++ String Functions |
2025-02-19 | C++ Tuples |
2025-02-13 | Map in C++ |
2025-01-15 | C++ Typedef and Type Aliases |
2025-01-14 | C++ Pair |
2025-01-13 | Javascript Rock Paper Scissors Minus One #squidgame |
2024-12-23 | Embed YouTube video in HTML |
2024-12-20 | HTML Boiler Plate vscode |
2024-12-19 | Animations in JavaScript games |
2024-12-09 | JavaScript Keyboard Events |
2024-12-04 | C++ Useful Math Functions |
2024-12-02 | Sounds and Music in JavaScript games |
2024-11-25 | Build A Password Generator With JavaScript |