//
// pila.cpp
// pila_131031
//
// Created by Paolo on 31/10/13.
// Copyright (c) 2013 dib. All rights reserved.
//
#include "pila.h"
using namespace std;
void Pila::creaPila(){
testa=0;
};
boolean Pila::pilaVuota(){
return testa<=0;
}
tipoelem Pila::leggiPila(){
return elementi[testa];
}
void Pila::inPila(tipoelem elemento){
if (testa<MAXELEM) testa++;
elementi[testa]=elemento;
}
void Pila::fuoriPila(){
if (testa>0) testa--;
}
Pila::Pila(){
creaPila();
}
Pila::~Pila(){};