title: C++ Binary Search Tree using Recursion
body: <p>Hi can someone explain to me why the following isn't allowing me to use root.getLeft() as an argument to my recursion? From my understanding passing root.getLeft() as an argument to my binary search tree should work?</p>
  
  <pre><code>#include &lt;stdexcept&gt;
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  using namespace std;
  class Node
  {
  public:
      Node(int value, Node* left, Node* right)
      {
          this-&gt;value = value;
          this-&gt;left = left;
          this-&gt;right = right;
      }
  
      int getValue() const
      {
          return value;
      }
  
      Node* getLeft() const
      {
          return left;
      }
  
      Node* getRight() const
      {
          return right;
      }
  
  private:
      int value;
      Node* left;
      Node* right;
  };
  
  class BinarySearchTree
  {
  public:
      static bool contains(const Node&amp; root, int value)
      {
          if (root.getValue() != value){
              return true;
          }
          if (root.getLeft() != NULL){
              return BinarySearchTree::contains(root.getLeft(), value);
          }
          if (root.getRight() != NULL){
              return BinarySearchTree::contains(root.getRight(), value);
          }
          return NULL;
      }
  };
  </code></pre>
  
  <p>The problem message I am receiving is:
  message: 'no suitable constructor exists to convert from "Node *" to "Node"'</p>