std::map

来自cppreference.com
< cpp‎ | container


 
 
 
std::map
成员函数
原文:
Member functions
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
map::map
map::~map
map::operator=
map::get_allocator
元素的访问
原文:
Element access
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
map::at
map::operator[]
迭代器
原文:
Iterators
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
map::begin
map::cbegin

(C++11)
map::end
map::cend

(C++11)
map::rbegin
map::crbegin

(C++11)
map::rend
map::crend

(C++11)
容量
原文:
Capacity
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
map::empty
map::size
map::max_size
修饰符
原文:
Modifiers
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
map::clear
map::insert
map::emplace(C++11)
map::emplace_hint(C++11)
map::erase
map::swap
查找
原文:
Lookup
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
map::count
map::find
map::equal_range
map::lower_bound
map::upper_bound
观察员
原文:
Observers
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
map::key_comp
map::value_comp
 
在头文件 <map> 中定义
template<

    class Key,
    class T,
    class Compare = std::less<Key>,
    class Allocator = std::allocator<std::pair<const Key, T> >

> class map;
std::map是一个有序关联容器,具有独特的键包含键 - 值对。键进行排序的比较函数Compare。具有对数搜索,去除和插入操作的复杂性。地图通常实现为红黑树.
原文:
std::map is a sorted associative container that contains key-value pairs with unique keys. Keys are sorted by using the comparison function Compare. Search, removal, and insertion operations have logarithmic complexity. Maps are usually implemented as 红黑树.
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
std::map符合要求的ContainerAllocatorAwareContainerAssociativeContainerReversibleContainer.
原文:
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

目录

[编辑] 类成员

成员类型 Definition
key_type Key [edit]
mapped_type T [edit]
value_type std::pair<const Key, T> [edit]
size_type
无符号整数类型(通常是size_t
原文:
Unsigned integral type (usually size_t)
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
[edit]
difference_type 有符号整型(通常是ptrdiff_t) [edit]
key_compare Compare [edit]
allocator_type Allocator [edit]
reference Allocator::reference (至 C++11)
value_type& (C++11 起) [edit]
const_reference Allocator::const_reference (至 C++11)
const value_type& (C++11 起) [edit]
pointer Allocator::pointer (至 C++11)
std::allocator_traits<Allocator>::pointer (C++11 起) [edit]
const_pointer Allocator::const_pointer (至 C++11)
std::allocator_traits<Allocator>::const_pointer (C++11 起) [edit]
iterator BidirectionalIterator [edit]
const_iterator 双向常迭代器[edit]
reverse_iterator std::reverse_iterator<iterator> [edit]
const_reverse_iterator std::reverse_iterator<const_iterator> [edit]

[编辑] 成员类别

比较对象类型value_type
原文:
compares objects of type value_type
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(类) [edit]

[编辑] 成员函数

构建map
原文:
constructs the map
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]
析构 map
(公共成员函数) [edit]
将值分配到容器中
原文:
assigns values to the container
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]
返回的关联分配器
原文:
returns the associated allocator
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]
元素的访问
原文:
Element access
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
(C++11)
访问指定的元素,同时进行越界检查
(公共成员函数) [edit]
访问指定的元素
原文:
access specified element
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]
迭代器
原文:
Iterators
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
返回指向容器开始的迭代器
(公共成员函数) [edit]
返回指向容器尾端的迭代器
(公共成员函数) [edit]
返回一个指向容器最后一个元素的反向迭代器
(公共成员函数) [edit]
返回一个指向容器前端的反向迭代器
(公共成员函数) [edit]
容量
原文:
Capacity
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
检查是否容器是空的
原文:
checks whether the container is empty
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]
返回的元素数
原文:
returns the number of elements
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]
返回可能容纳的最大元素数
(公共成员函数) [edit]
修饰符
原文:
Modifiers
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
清除其内容
原文:
clears the contents
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]
插入元素
原文:
inserts elements
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]
(C++11)
就地构造元素
(公共成员函数) [edit]
(C++11)
构建了一丝元素的地方使用
原文:
constructs elements in-place using a hint
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]
擦除元素
原文:
erases elements
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]
交换map的内容
(公共成员函数) [edit]
查找
原文:
Lookup
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
返回匹配的特定键的元素的数量
原文:
returns the number of elements matching specific key
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]
发现与特定键的元素
原文:
finds element with specific key
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]
回报在一个特定的键匹配的元素
原文:
returns range of elements matching a specific key
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]
返回一个迭代器的第一个元素“不低于”大于给定值
原文:
returns an iterator to the first element not less than the given value
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]
返回一个迭代器的第一个元素“更大的”超过一定值
原文:
returns an iterator to the first element greater than a certain value
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]
观察员
原文:
Observers
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
比较键返回功能
原文:
returns the function that compares keys
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]
返回键类型value_type类型的对象进行比较的功能,
原文:
returns the function that compares keys in objects of type value_type
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]

[编辑] 非成员函数

根据字典顺序比较的map中的值
原文:
lexicographically compares the values in the map
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(函数模板) [edit]
特化std::swap算法
(函数模板) [edit]