#include "stack.h" Stack::Stack() { Content *top=0; } void Stack::push(int a) { Content *c = new Content(a, top); top = c; } int Stack::pop() { int d=top->getVal(); top=top->getNext(); return d; } Stack::~Stack() { delete top; }