Calico
Saturday, July 29, 2017
stack.cpp
#include"stack.h"
Stack::Stack()
{
LinkedList* list = new LinkedList();
}
Stack::~Stack()
{
removeAll();
}
int Stack::empty()
{
return list->empty();
}
void Stack::push(int num)
{
list->prepend(num);
}
int Stack::pop()
{
return list->removeHead();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Lab 3: Tasks 1-3
/* * imageops.c - Simple operations on images * * C laboratory exercises. * Richard Vaughan, 2014. */ #include <assert.h> #includ...
Lab 1 Task 7 (not done)
#include <stdio.h> int main (void) { int result = 0; float i = 0; scanf (%f, &i); while (result !=...
No comments:
Post a Comment