stack

C++ Library  
 
 

Header

<stack>

A stack is a container adaptor that allows one to use any container that supports push_back and pop_back as a first-in, last-out data structure.

The stack container has a single data member, Cont c. This data member defines the container that holds the stack. The container class is required to define the following public members.

	typedef T value_type;
	typedef T0 size_type;
	Cont(const allocator_type& al);
	bool empty() const;
	size_type size() const;
	allocator_type get_allocator() const;
	value_type& back();
	const value_type& back() const;
	void push_back(const value_type& x);
	void pop_back();

Here, T0 is an unspecified type that meets the stated requirements.


Class Members

Constructor

stack Constructs a stack

Member Functions

empty get_allocator top push pop
size

Template Functions

operator!= operator== operator<
operator<= operator> operator>=


© 1997 Microsoft Corporation. All rights reserved. Terms of Use.