Linked List (LinkedList.h)


/ Published in: C++
Save to your folder(s)



Copy this code and paste it in your HTML
  1. template < class T >
  2. class LinkedNode;
  3.  
  4. template < class T >
  5. class LinkedList
  6. {
  7. private:
  8. LinkedNode< T > * firstNode; //the first node in our list
  9. //LinkedNode * currentNode; //the node we're currently operating on
  10. //void setCurrentNode( int nodeNumber );
  11. int size;
  12. public:
  13. LinkedList< T >();
  14. void add( T value );
  15. void remove( T value );
  16. void removeByIndex( int index );
  17. T get( int index );
  18. int getSize();
  19.  
  20. };

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.