C++ Lists [C++ Reference]
Keywords: stl,list,start
Date: 2010-04-08T16:33:16-0700

[[C++ Lists]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- cz
- de
- es
- fr
- it
- jp
- nl
- pl
- ro
- ru
- sk
- tr
- tw

# C++ Lists

Lists are sequences of elements stored in a linked list. Compared to vectors, they allow fast insertions and deletions, but no random access.

Constructors | create lists and initialize them with some data
Operators | assign and compare lists
assign | assign elements to a list
back | returns a reference to last element of a list
begin | returns an iterator to the beginning of the list
clear | removes all elements from the list
empty | true if the list has no elements
end | returns an iterator just past the last element of a list
erase | removes elements from a list
front | returns a reference to the first element of a list
insert | inserts elements into the list
max_size | returns the maximum number of elements that the list can hold
merge | merge two lists
pop_back | removes the last element of a list
pop_front | removes the first element of the list
push_back | add an element to the end of the list
push_front | add an element to the front of the list
rbegin | returns a reverse_iterator to the end of the list
remove | removes elements from a list
remove_if | removes elements conditionally
rend | returns a reverse_iterator to the beginning of the list
resize | change the size of the list
reverse | reverse the list
size | returns the number of items in the list
sort | sorts a list into ascending order
splice | merge two lists in constant time
swap | swap the contents of this list with another
unique | removes consecutive duplicate elements

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •