// Justin C. Miller
// University of Wisconsin Oshkosh
// Made for: http://www.geocities.com/neonprimetime.geo/index.html
// Date: 2001
// Borland Builder 4.0
//
// AStack.cpp
//
#include "AStack.h"
template
bool AStack::IsEmpty() const {return top == 0;}
template
T AStack::Pop()
{
if(IsEmpty())
Error("The stack is Empty, can't Pop.") ;
else
return data[top--] ;
}
template
void AStack::Push(const T & X)
{
if(top == 99) Error("The Stack is Full, can't Push.") ;
top++ ;
data[top] = x ;
}
template
T AStack::Top() const
{
if(IsEmpty())
Error("The stack is empty, can't find Top.") ;
else
return data[top] ;
}
               (
geocities.com/neonprimetime.geo/cpp)                   (
geocities.com/neonprimetime.geo)