Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong><a href="http://en.cppreference.com/w/cpp/container/vector" rel="noreferrer">std::vector</a></strong>: A dynamic-array class. The internal memory allocation makes sure that it always creates an array. Useful when the size of the data is known and is known to not change too often. It is also good when you want to have random-access to elements.<br/> <strong><a href="http://en.cppreference.com/w/cpp/container/deque" rel="noreferrer">std::deque</a></strong>: A double-ended queue that can act as a stack or queue. Good for when you are not sure about the number of elements and when accessing data-element are always in a serial manner. They are fast when elements are added/removed from front and end but not when they're added/removed to/from the middle.<br/> <strong><a href="http://en.cppreference.com/w/cpp/container/list" rel="noreferrer">std::list</a></strong>: A double-linked list that can be used to create a 'list' of data. The advantage of a list is that elements can be inserted or deleted from any part of the list without affecting an iterator that is pointing to a list memeber (and is still a member of the list after deletion). Useful when you know that elements will be deleted very often from any part of the list.<br/> <strong><a href="http://en.cppreference.com/w/cpp/container/map" rel="noreferrer">std::map</a></strong>: A dictionary that maps a 'key' to a 'value'. Useful for applications like 'arrays' whose index are not an integer. Basically can be used to create a map-list of name to an element, like a map that stores name-to-widget relationship.<br/> <strong><a href="http://en.cppreference.com/w/cpp/container/set" rel="noreferrer">std::set</a></strong>: A list of 'unique' data values. For e.g. if you insert 1, 2, 2, 1, 3, the list will only have the elements 1, 2, 3. Note that the elements in this list are always ordered. Internally, they're usually implemented as binary search trees (like map).<br/></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload