#ifndef _LIST #define _LIST template class List; template class ListNode { friend class List; private: T data; ListNode *next; public: ListNode(T d); }; template class List { private: ListNode *head; public: List(); int Length() const; bool Member(const T& d); void Insert(const T& d); bool Delete(const T& d); void Output(ostream& out) const; }; // overload << template ostream& operator<<(ostream& out, const List& l) { l.Output(out); return out; } #endif