std::stack
来自cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Defined in header <stack>
|
||
template< class T, |
||
std::stack
类是为程序员提供了一个栈的功能 - 即,FILO(先入,最后出)的数据结构的容器适配器. Original:
The
std::stack
class is a container adapter that gives the programmer the functionality of a stack - specifically, a FILO (first-in, last-out) data structure. The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 会员类型
会员类型
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
container_type
|
Container
|
value_type
|
Container::value_type
|
size_type
|
Container::size_type
|
reference
|
Container::reference
|
const_reference
|
Container::const_reference
|
[编辑] 成员函数
构建 stack Original: constructs the stack The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |
destructs the stack (公共成员函数) | |
将值指派给容器适配器 Original: assigns values to the container adaptor The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |
Original: Element access The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
访问的顶级元素 Original: access the top element The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |
Original: Capacity The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
检查是否有潜在的容器是空的 Original: checks whether the underlying container is empty The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |
返回的元素数 Original: returns the number of elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |
Original: Modifiers The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
inserts element at the top (公共成员函数) | |
(C++11) |
constructs element in-place at the top (公共成员函数) |
移除最上面的元素 Original: removes the top element The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |
交换的内容 Original: swaps the contents The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |
Original: Member objects The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Container c |
基础容器 Original: the underlying container The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (受保护的成员对象) |
[编辑] 非成员函数
字典中的值比较的stack Original: lexicographically compares the values in the stack The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) | |
专业的std::swap算法 Original: specializes the std::swap algorithm The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
[编辑] Helper类
专业的std::uses_allocator型特征 Original: specializes the std::uses_allocator type trait The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |