C++ 标准模板库STL
答案:3 悬赏:40
解决时间 2021-02-19 14:17
- 提问者网友:冷场帝
- 2021-02-19 09:52
急求C++标准模板库STL里面的stack类的各成员函数(如pop();top();empty()等)的用法(包括参数、返回值类型等)。谢谢!急急急急……
最佳答案
- 二级知识专家网友:24K纯糖
- 2021-02-19 10:28
Constructors
stack
Constructs a stack that is empty or that is a copy of a base container object.
Typedefs
container_type
A type that provides the base container to be adapted by a stack.
size_type
An unsigned integer type that can represent the number of elements in a stack.
value_type
A type that represents the type of object stored as an element in a stack.
Member Functions
empty
Tests if the stack is empty.
pop
Removes the element from the top of the stack.
push
Adds an element to the top of the stack.
size
Returns the number of elements in the stack.
top
Returns a reference to an element at the top of the stack.
MSDN就可以了。
stack
Constructs a stack that is empty or that is a copy of a base container object.
Typedefs
container_type
A type that provides the base container to be adapted by a stack.
size_type
An unsigned integer type that can represent the number of elements in a stack.
value_type
A type that represents the type of object stored as an element in a stack.
Member Functions
empty
Tests if the stack is empty.
pop
Removes the element from the top of the stack.
push
Adds an element to the top of the stack.
size
Returns the number of elements in the stack.
top
Returns a reference to an element at the top of the stack.
MSDN就可以了。
全部回答
- 1楼网友:邪性洒脱
- 2021-02-19 12:32
c++的标准函数库基本上来源于c函数,而stl是基于c++语法而实现的一套更加高层的基本库,主要使用了c++的继承、模板、重载、友元等语言特性。 赞同
- 2楼网友:悲观垃圾
- 2021-02-19 12:04
那说起来那么多...
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯