cppreference.com -> C++ Stacks

C++ Stacks

The C++ Stack is a container adapter that gives the programmer the functionality of a stack -- specifically, a FILO (first-in, last-out) data structure.

Operators compare and assign stacks
empty() true if the stack is empty
pop() removes the top element
push() adds an element to the top
size() returns the number of elements in the stack
top() returns the top element of the stack