Stack (C++)


A stack is a standard C++ container adapter, designed to be used in a LIFO context, and is implemented with an interface/wrapper to the type passed to it as a template argument, which defaults to a deque. It is so simple, that it can be described with just a sample interface:

templateClass C = deque >
class std::stack ;

Overview of Functions

FunctionDescription
Element AccessGet a reference to the top element of the stack, does not pop it
ModifiersPush an element onto the stack
ModifiersPop off the top element of the stack
SizeGet number of elements
Size--