title: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
body: <p>I am getting this error can anyone tell me why is this so?</p>
  
  <pre><code>error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
       if (root == n1 || root == n2)
  </code></pre>
  
  <p>Please note that it's Function problem i.e.
      you need to write your solution in the form Function(s) only.
      Driver Code to call/invoke your function would be added by GfG's Online Judge.</p>
  
  <p>Here is the code:   </p>
  
  <pre><code>/* A binary tree node
  struct Node
  {
      int data;
      Node* left, * right;
  }; */
  /*you are required to 
  complete this function */
  Node * LCA(Node* root ,int n1 ,int n2 )
  {
      if(root==NULL) 
      {
          return NULL;
      }
      if(root==n1||root==n2)
      {
          return root;
      }
      Node* left=LCA(root-&gt;left,n1,n2);
      Node* right=LCA(root-&gt;right,n1,n2);
      if(root-&gt;left!=NULL&amp;&amp;root-&gt;right!=NULL)
      {
          return root;
      }
      if(root-&gt;left==NULL&amp;&amp;root-&gt;right==NULL)
      {
          return NULL;
      }
      return left!=NULL?left:right;
     //Your code here 
  }
  </code></pre>