Загрузка...

Basics of Map | Containers in STL | C++ Programming

Maps store data in the form of key value pair. Keys and values are related to each other. We divide map into four parts - map, multimap, unordered_map, unordered_multimap. We can decide key and value type by own. Maps have not indexing so that we use range based loop to display all pairs of map.

We can insert data into map in the form of pair. We can use insert function, with the help of pair or make_pair( ) function to insert data.

There are various functions available in map
1. size( ) - find size of map
2. clear( ) - to empty map
3. empty( ) - check map is empty or not
4. insert( ) - insert data into map
5. erase( ) - insert data from map
6. count( ) - count any pair in map

If you find my videos are useful, then like, share and subscribe my channel: @trueforcode

Видео Basics of Map | Containers in STL | C++ Programming канала trueforcode
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять