Files
UU_la_parallel_programming_…/Assignment_3/lib/Stack.cpp
2021-01-08 17:17:32 +01:00

25 lines
525 B
C++

#include "Stack.h"
#include "Node.h"
#include <iostream>
#include<sstream>
Stack::Stack(std::string _name){
first = Node::Dummy();
first->next = Node::Dummy();
}
bool Stack::push(int element) { return false; }
bool Stack::pop(int element) { return false; }
bool Stack::size(int element) { return false; }
std::string Stack::print_stack(){
Node* c = this->first->next;
std::stringstream ss;
while (!c->is_dummy()) {
ss << c->get_data() << " ";
c = c->next;
}
return ss.str();
}