双链表 节点类
template<class T>
class DLLNode{
public:
T data;
DLLNode *next, *prior;
DLLNode(){ next=prior=0; }
DLLNode(const T& el,DLLNode *n=0, DLLNode *p=0){ data=el; next=n; prior=p; }
};
双链表类
templata<class T>
class DoublyLinkedList{
protected:
DLLNode<T> *head;
public:
DoublyLinkedList() {
head = new DLLNode<T>();
}
void addDLLNode(const T&,i);
void clear();
~DoublyLinkedList() {clear(); }
};