Sequence Containers Data is stored in a linear fashion. Each element is related to other elements by its position. Elements can be accessed using an iterator. Examples of sequence containers are: Vector, List, and Dequeue. Vector: Dynamic array that allows insertion and deletion of elements at any position. Elements in a vector are contiguous. Allows direct access of an element. Defined in header file <vector>. List: A bi-directional list that allows insertion and deletion of elements at any position. Elements in a list are not contiguous. Defined in header file <list>. Dequeue: A double ended queue
The post what is the difference between sequence, associative and derived containers in C++ appeared first on Coding Security.
what is the difference between sequence, associative and derived containers in C++
read more
Tidak ada komentar:
Posting Komentar