There are vectors in STL, just like arrays. The only difference from an abstract perspective is that vectors can be expanded at any time. Use
vector
vec.push_back(13), add 13 to the end of the vector, and increase the size of vec by 1
vec.pop(); delete the last element, and decrease the size of vec by 1< /p>
The stack in STL only provides operations on the top of the stack.
stack
stk.push_back(13), top increases by 1, points to Refers to assignment 13
stk.pop(), top minus 1