Advertisement
SilverhandX

list.h

Feb 22nd, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #ifndef LIST_H
  2. #define LIST_H
  3.  
  4. class List
  5. {
  6. private:
  7.     struct ListNode
  8.     {
  9.         int value; //Value in this node
  10.         struct ListNode *next; //Points to the next node
  11.     };
  12.  
  13.     ListNode *head; //Head pointer
  14.  
  15. public:
  16.     List()
  17.     { head = 0; }
  18.  
  19.     ~List();
  20.  
  21.     //Linked list operations:
  22.     void appendNode(int);
  23.     void insertNode(int);
  24.     void deleteNode(int);
  25.     void displayList();
  26. };
  27. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement