Stack the container

Stack is an advanced data structure, it has only one exit push() on the stack and pop() off the bottom of the stack. The advanced data structure does not allow traversal behavior, only the data on the top of the stack can be seen. I can determine whether the container is empty and return the number of elementsCopy the code

Stack Common interfaces

Constructor: stack<T> STK; Stack (const stack & STK); // Stack (const stack & STK); // Copy constructor assignment: stack& operator=(const stack& STK); // Overloading symbol operator: push: pop returns top: empty: empty returns stack size: sizeCopy the code