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...
lel
int LLcycle(list_t* list) { element_t* el1 = list->head; element_t* el2 = list->head->next; while(1){ // NULL is det...
No comments:
Post a Comment