http://blog.csdn.net/zhaowei123191/article/details/5617559 ize_t 是unsigned类型, 用于指明数组长度或下标,它必须是一个正数,std::size_t ptrdiff_t 是signed类型, 用于存放同一数组中两个指针之间的差距,它可以使负数,std::ptrdiff_t. size_type 是unsigned类型, 表示容器中元素长度或者下标,vector<int>::size_type i = 0; differen…
size_t是unsigned类型,用于指明数组长度或下标,它必须是一个正数,std::size_t ptrdiff_t是signed类型,用于存放同一数组中两个指针之间的差距,它可以负数,std::ptrdiff_t. size_type是unsigned类型,表示容器中元素长度或者下标,vector<int>::size_type i = 0; difference_type是signed类型,表示迭代器差距,vector<int>:: difference_type = it…
  目录(?)[-] size_type size_t different_type ptrdiff_t size_t是unsigned类型,用于指明数组长度或下标,它必须是一个正数,std::size_t ptrdiff_t是signed类型,用于存放同一数组中两个指针之间的差距,它可以使负数,std::ptrdiff_t. size_type是unsigned类型,表示容器中元素长度或者下标,vector<; difference_type是signed类型,表示迭代器差距,vector<…
ptrdiff_t是C/C++标准库中定义的一个与机器相关的数据类型.ptrdiff_t类型变量通常用来保存两个指针减法操作的结果.ptrdiff_t定义在stddef.h(cstddef)这个文件内.ptrdiff_t通常被定义为long int类型. ptrdiff_t定义在C99标准中. ptrdiff_t 标准库类型(library type)ptrdiff_t 与 size_t 类型一样,ptrdiff_t 也是一种与机器相关的类型,在 cstddef 头文件中定义.size_t 是u…
std::set template < class T, // set::key_type/value_type class Compare = less<T>, // set::key_compare/value_compare class Alloc = allocator<T> // set::allocator_type > class set; Set Sets are containers that store unique elements followi…
std::map template < class Key, // map::key_type class T, // map::mapped_type class Compare = less<Key>, // map::key_compare class Alloc = allocator<pair<const Key,T> > // map::allocator_type > class map; Map Maps are associative co…
std::list template < class T, class Alloc = allocator > class list; List Lists are sequence containers that allow constant time insert and erase operations anywhere within the sequence, and iteration in both directions. List containers are implement…
std::forward_list template < class T, class Alloc = allocator > class forward_list; Forward list Forward lists are sequence containers that allow constant time insert and erase operations anywhere within the sequence. Forward lists are implemented a…
std::deque template < class T, class Alloc = allocator > class deque; Double ended queue deque means double enden queue; deque (usually pronounced like "deck") is an irregular acronym of double-ended queue. Double-ended queues are sequence…
http://www.cplusplus.com/reference/vector/vector/?kw=vector C++中,vector<bool>为了达到节省内存的目的,专门做了特化,大概方式就是用bit位来存储数组中的元素.代价就是,这个容器里面的内置类型乱掉了: member type definition notes value_type The first template parameter (bool) allocator_type The second template…