{
top? =? - 1;
This-> Size? =? Size;
Data? =? New? int[size];
}
intStack::~intStack()
{
Delete? [] data;
}
Bull? intStack::Push(int? elem)
{
If (top? ==? Size? -? 1)
{
Return? Fake;
}
other
{
Data [++top]? =? elem
}
Return? True;
}
Bull? intStack::Pop(int? & ampelem)? //Stacking operation
{
If (top? ==? - 1)
{
Return? Fake;
}
other
{
elem? =? Data [top];
Data [top-];
}
Return? True;
}
int? intStack::Length(? )? const? //Get the number of elements in the stack
{
Return? Size;
}