Student Of Fortune

Library of List In C++ language

Share on :

Single linked list or so-called linked list consists of individual elements, where each individual will be mutually connected. Each element consists of two parts, namely the data / information that is stored and the other as a liaison with the next element.

Let's See The Library of List :

reference :

http://www.cppreference.com/wiki/container:list:start

Member types

Member type Definition
value_type : T
allocator_type : Allocator
size_type : Unsigned integral type (usually size_t)
difference_type : Signed integral type (usually ptrdiff_t)
reference : Allocator::reference
const_reference : Allocator::const_reference
pointer : Allocator::pointer
const_pointer : Allocator::const_pointer
iterator : Bidirectional iterator
const_iterator : Constant bidirectional iterator
reverse_iterator : reverse_iterator<iterator>
const_reverse_iterator : reverse_iterator<const_iterator>

Member functions

(constructor) : constructs the container
operator= : assigns the contents of the container
assign : assigns the contents of the container
operator==,!=,>,<,>=,<= : compares the contents
get_allocator : returns the allocator associated with the container
Element access
front : access the first element
back : access the last element
Iterators
begin, cbegin : returns an iterator to the beginning
end, cend : returns an iterator to the end
rbegin, crbegin : returns a reverse_iterator to the beginning of reversed container
rend, crend : returns a reverse_iterator to the end of reversed container
Capacity
empty : checks whether the container is empty
size : returns the number of elements
max_size : returns the maximum number of elements
Modifiers
clear : removes all elements
insert : inserts elements
emplace : todo (C++0x feature)
erase : removes elements
push_front : inserts an element to the beginning
emplace_front : todo (C++0x feature)
pop_front : removes the first element
push_back : inserts an element to the end
emplace_back : todo (C++0x feature)
pop_back : removes the last element
resize : changes the number of the elements stored
swap : swaps the contents
Operations
merge : merges two sorted lists
splice : moves the elements between containers
remove : removes elements with specific value
remove_if : removes elements meeting specific criteria
reverse : reverses the order of the elements
unique : removes consecutive duplicate elements
sort : sorts the elements 

0 comments on Library of List In C++ language :

Post a Comment and Don't Spam!

Dont Spam please

 
Recommended Post Slide Out For Blogger

Recent Comments

My Rank