C++ STL中的vector使用方法说明
发布时间
阅读量:
阅读量
本文将介绍基于C++11标准的std::vector用法。该类定义于包含
template<
class T,
class Allocator = std::allocator<T>
> class vector;
其包含成员类型其成员函数如下:
成员类型
| 成员类型 | 定义 |
|---|---|
| value_type | T |
| allocator_type | Allocator |
| size_type | 无符号整数类型(通常是std::size_t ) |
| difference_type | 有符号整数类型(通常是std::ptrdiff_t ) |
| reference | value_type& |
| const_reference | const value_type& |
| pointer| std::allocator_traits
||
| const_pointer
|std::allocator_traits
| iterator| 随机访问迭代器 (RandomAccessIterator)
||
| const_iterator
|
全部评论 (0)
还没有任何评论哟~
