Advertisement
fedexist

Class

May 7th, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. class stack {
  2.     class Nodo {
  3.     public:
  4.         Nodo(int val,Nodo* pre):valore(val),prev(pre){};
  5.         ~Nodo();
  6.         int getValore();
  7.         void setValore(int nuovoVal);
  8.         Nodo* getPrev();
  9.     private:
  10.         int valore;
  11.         Nodo* prev;
  12.     };
  13. stack(const stack &other);
  14.     public:
  15.         stack(int pMaxSize);
  16.         ~stack(void);
  17.         void push(int i);
  18.         int pop(void);
  19.         int size(void);
  20.         const int &getTop();
  21.     private:
  22.         Nodo* head;
  23.         Nodo* top;
  24.         int dimensione;
  25.         int contaEle;
  26. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement