#include<stack>
栈:先进后出
#include
stack
temp.pop():移除栈顶元素。
temp.push():在栈顶增加元素。
temp.empty():栈为空返回真。
temp.top():返回栈顶元素。
temp.size():返回栈中元素数目。
如果想让stack底层容器为list
stack
函数如上正常使用。
栈:先进后出
#include
stack
temp.pop():移除栈顶元素。
temp.push():在栈顶增加元素。
temp.empty():栈为空返回真。
temp.top():返回栈顶元素。
temp.size():返回栈中元素数目。
如果想让stack底层容器为list
stack
函数如上正常使用。