title: Tree implementation in C++: Cannot convert Node to Node*
body: <p>My error is regarding the last two assignment statements in main. I am trying to create a basic tree by having each node point to 2 other nodes: left and right. I have also tried adding * in front of n1, n2, and n3 when creating them, but that did not work either...</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string.h&gt;
  
  using namespace std;
  
  class Node{
  
      public:
      string value;
      Node *left, *right;
  
      public:
      Node(string s, Node *l, Node *r){
          value = s;
          left = l;
          right = r;
      }
      void display(){
          cout &lt;&lt; value &lt;&lt; left-&gt;value &lt;&lt; right-&gt;value;
      }
  
  };
  int main(){
  
      Node n1("this", NULL,NULL);
      Node n2("is", NULL, NULL);
      Node n3("next", NULL, NULL);
      n1.left = n2;
      n1.right = n3;
  
      n1.display();
      return 0;
  }
  </code></pre>