June 2025
Intermediate to advanced
1093 pages
33h 24m
English
In this section, Cont or C stands for one of the container types like set<int> or map<int,string>, and cont is for an instance of a container, such as set<int> cont;. For key type, I use Key or K, for target type Target or T, and the value type pair<K,T> is Value or V. Iterator types are abbreviated as It.
set<Key>This “set” contains elements where the stored values are also the keys, in contrast to the map. For example, simply put all Person elements into a set<Person>. Because the keys are always well-ordered, the elements are now always sorted, allowing fast retrieval in guaranteed time.
map<Key,T>Use map to translate values of one type to another. map finds a corresponding target value based on a key. ...
Read now
Unlock full access