Advertisement
SilverhandX

list2.h

Feb 24th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 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 insertSpecificNode(int, int);
  25.     void deleteNode(int);
  26.     void displayList();
  27. };
  28. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement