23 lines
689 B
C
23 lines
689 B
C
|
// 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;
|