Click on array_stack.cpp to get source.

// File: C++Examples/Stacks/array_stack.cpp 
#include <iostream>
#include "array_stack.h"

// The following three functions define the array_stack operations 
bool array_stack::is_empty(void) const
{return( (top == 0 ) );
}// end is_empty 


void array_stack::push(int i)
{// no check for overflow 
 array[top++] = i;
}// end push 


int array_stack::pop(void)
{// no check for underflow 
 return array[--top];
}// end pop 

stack* array_stack::clone(void) const
   {return new array_stack(*this);}