DNWA/11/wywolania/Data/stide_v1.1/Utils/linklist.h
Jakub Stefko ab1d7e2546 ...
2021-01-28 18:33:55 +01:00

23 lines
689 B
C++
Executable File

// linklist.h
#include <iostream.h>
#include "list.h"
class LLNode;
class LinkedList : public List {
LLNode *root;
public:
LinkedList(void);
~LinkedList(void);
LinkedList(const LinkedList &llist); // the copy constructor
LinkedList &operator = (const LinkedList &llist);
int Insert(int val); // this does not insert if val already exists
// returns 1 if it could insert
// could later on also do frequency counts
int Search(int val);
void Write(ostream &s);
friend ostream &operator<<(ostream &s, LinkedList &ll);
int Empty(void) {return (root ? 0 : 1);}
};
//typedef LinkedList *LinkedListPtr;