mirror of
https://github.com/13hannes11/UU_la_parallel_programming_practical_assignments.git
synced 2024-09-04 00:50:58 +02:00
update filenames
This commit is contained in:
24
Assignment_3/lib/Stack.cpp
Normal file
24
Assignment_3/lib/Stack.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#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();
|
||||
}
|
||||
Reference in New Issue
Block a user