Rajinder Yadav - Windows C++ Development Tools & Resources :Design, Code, Test, Deploy
STL Basics
STL Intro
Big 3 Rule
Namespace
Iterator
STL End Node
Size vs Capacity
Performance
Adaptors
Algorithmn
Functors
Containers
Container Adaptors
STL Reference
vector
list
deque
queue
stack
map
multimap
set
multiset
C++ Standard Type Library

#include <stack>
template class Type,  class Container=deque<Type> > class stack
Parameters
Type - Element data type.
Allocator - Memory allocator/deallocator, optional.

Constructors

stack( )

explicit stack( const container_type& src );
Parameters
   src - The source container the stack is to be a copy.

Methods
empty()Check if the stack is empty.
pop()Removes theelement from the top.
push()Adds an element to the top.
size()Get the count of elements.
top()Returns a reference to the top element.


Usage
STL Home

Copyright © 2007 Rajinder Yadav, All rights reserved