CS 1337 Lecture Notes - Lecture 18: Include Directive, Default Constructor, Xander Harris

22 views3 pages

Document Summary

I. e. employee ids are keys and employee names are values. In an associative container, each element in that container has two parts. When referring to an element, you use the key. To retrieve a value from a map, you supply the key associated with that value. * can use the map class to store key-value pairs. * in the map class, the keys must be unique * there are no duplicate keys in the map class. * can be used to both add new elements and access existing elements. * internally, a map uses instances of a pair type. * pair is a structure and has two member variables called first and second. * key is stored in first, the value is stored in second. * there is a header file, called , that is automatically included as part of * this insert function takes an instance of pair.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents