morristyb

Untitled

Feb 23rd, 2021
557
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. template<class T>
  2. class Node
  3. {
  4.     T item;
  5.     Node<T> * next;
  6. public:
  7.     Node():next(nullptr){};
  8.     Node(const T& anItem):item(anItem),next(nullptr){};
  9.     Node (const T& anItem, Node<T>* nextNode):item(anItem),next(nextNode);
  10.     void setItem(const T& anItem);
  11.     setNext(Node<T>* nextNode);
  12.     T getItem() const;
  13.     Node<T>* getNext() const;  
  14.  
  15.  
  16. };
RAW Paste Data