stl容器类:
vector 还有的三个成员变量 start finish end_of_storage [start,finish)
vector 大小为 finish-start
vector 容量为 end_of_storage - start
函数:
iterator vector::begin()
iterator vector::end()
iterator vector::rbegin()
iterator vector::rend()
size_type vector::size() const
size_type vector::max_size() const
size_type vector::capacity() const
bool vector::empty()
reference vector::operator[](size_type n)
explilcit vector::vector(const Allocator& A = Allocator)
reference vector::front()
referrnce vector::back()
void vector::push_bacc()
void vector::pop_back()
iterator vector::insert(iterator pos,const T& x)
iterator vector::erase(iterator first,iterator last)
iterator vector::erase(iterator pos)
void vector::cleat()
void vector::assign(size_type n,const vector& x)
list 双向的链表,支持前后两种移动方向,支持在开头、尾端、中间处
安插及移除元素
::begin()
::end()
::rbegin()
::rend()
::size()
::max_size()
::empty()
::swap(list&)
::front()
::back()
::push_front
::pop_front
::push_back
::pop_back
::insert(iterator pos,const T& x)
::assign(size_type n,const T& t= T())
::remove(const T&)
::unique()
::merge(list& x)
::reverse()
::sort()
<set>集合类:
::value_type
::key_type
::key_compare
::value_compare
::reference
::size_type
::iterator
::begin()
::end()
::rbegin()
::rend()
::size()
::max_size()
::empty()
::key_campare()
::value_campare()
::swap(set &)
::insert(const valuetype &)
::insert(iterator pos,const value_type &)
::erase(iterator pos)
::erase(const key_type &k)
::erase(iterator s,iterator e)
::find(const key_type &k)
::count(const keytype &k)
::lower_bound(const key_type& k)
::upper_bound(const key_type& k)
::equel_range(const key_type &k)
==
<
map<没有两个元素具有相同的key>
multiset
multimap
hash_set
hash_map
stacks:
::size()
::empty()
::pop
::push
==
<
queues:
::size()
::empty()
::back()
::push()
::pop()
==
<
priority queues
C++ - stl概述
于 2019-10-09 08:09:02 首次发布