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.

Display all entries for C++ Stacks on one page, or view entries individually:

Stack constructorsconstruct a new stack
emptytrue if the stack has no elements
popremoves the top element of a stack
pushadds an element to the top of the stack
sizereturns the number of items in the stack
topreturns the top element of the stack