I'm a little bit confused, can somebody please explain the main difference between those types of containers:
map
list
set
array
thanks in advanca(I'm asking about C++)
I'm a little bit confused, can somebody please explain the main difference between those types of containers:
map
list
set
array
thanks in advanca(I'm asking about C++)
http://cplusplus.com/reference/stl/
- Maps are a kind of associative containers that stores elements formed by the combination of a key value and a mapped value.
- Lists are a kind of sequence containers. As such, their elements are ordered following a linear sequence.
- Sets are a kind of associative containers that stores unique elements, and in which the elements themselves are the keys.
Arrays are also a kind of sequence containers, just much lower level than list. Their size is fixed, they don't manage memory dynamically and aren't generic. They are inherited from C.
SGI has a good tutorial and documentation on STL for the map, list and set. For arrays any basic C or C++ tutorial will cover this information.