daily pastebin goal
12%
SHARE
TWEET

Untitled

a guest May 16th, 2018 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #pragma once
  2. #include <string>
  3. #include <iostream>
  4.  
  5.  
  6.  
  7. template <class T>
  8. class Node
  9. {
  10.     T data;
  11.     Node<T> *next;
  12. public:
  13.     Node<T>() : next(nullptr) {};
  14.     T getData() const { return data; }
  15.     void setData(T input) {
  16.         data = input;
  17.     }
  18.     Node<T> *getNext() const { return next; } //this gosdh dang * also fixed everything.
  19.     void setNext(Node<T> *ptr) { next = ptr; }
  20. };
RAW Paste Data
Top