mirror of
https://github.com/13hannes11/UU_la_parallel_programming_practical_assignments.git
synced 2024-09-04 00:50:58 +02:00
setup project for assignment 3
This commit is contained in:
26
Assignment_3/lib/Set.cpp
Normal file
26
Assignment_3/lib/Set.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "Set.h"
|
||||
#include "Node.h"
|
||||
|
||||
#include <iostream>
|
||||
#include<sstream>
|
||||
|
||||
Set::Set(std::string _name){
|
||||
name = _name;
|
||||
first = Node::Dummy();
|
||||
first->next = Node::Dummy();
|
||||
}
|
||||
|
||||
bool Set::add(int element) { return false; }
|
||||
bool Set::rmv(int element) { return false; }
|
||||
bool Set::ctn(int element) { return false; }
|
||||
std::string Set::get_name() { return name; }
|
||||
|
||||
std::string Set::print_set(){
|
||||
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