STL容器及操作

容器分类:序列式容器和关联式容器

图片来自 这里

容器成员函数

成员函数按类型有如下分类,不同容器对应的成员函数可查看这里

序列式容器成员函数 成员函数关联式容器
iteratorsbegin beginiterators
end end
rbegin rbegin
rend rend
const iteratorscbegin cbeginconst iterators
cend cend
crbegin crbegin
crend crend
capacitysize sizecapacity
max_size max_size
empty empty
resize  
shrink_to_fit  
capacity  
reserve reserve
element accessfront  element access
back  
operator[] operator[]
at at
modifiersassign emplace_hintmodifiers
emplace emplace
insert insert
erase erase
emplace_back  
push_back  
pop_back  
emplace_front  
push_front  
pop_front  
clear clear
swap swap
list operationssplice countoperations
remove find
remove_if equal_range
unique lower_bound
merge upper_bound
sort  
reverse  
observesget_allocator get_allocatorobservers
data key_comp
   value_comp
   key_eq
   hash_function
   bucketbuckets
   bucket_count
   bucket_size
   max_bucket_count
   rehash hash policy 
   load_factor
   max_load_factor

 

参考文献:

  1. C++容器及成员函数
  2. STL容器
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值