/ Published in: C++

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
template < class T > class LinkedList; template < class T > class LinkedNode { private: T value; // our generic value LinkedList< T > * list; // the linked list we're part of LinkedNode< T > * previousNode; // the previous node LinkedNode< T > * nextNode; // the next node public: LinkedNode< T >( LinkedList< T > plist, LinkedNode< T > pNode, T * val ); // constructor LinkedNode< T > * next( void ); // return the next node LinkedNode< T > * previous( void ); // return the previous node T getValue( void ); // return the value we're holding void setNextNode( LinkedNode< T > next ); };
Comments
