title: error: invalid operands to binary == (have 'struct demo' and 'struct demo')
body: <p>Code 1:</p>
  
  <pre><code>struct demo
  {
      int a;
  }d[2];
  
  int main()
  {
      d[0].a=5;
      d[1]=d[0];
      return 0;
  }
  </code></pre>
  
  <p>This code works fine</p>
  
  <p>Code 2:</p>
  
  <pre><code>struct demo
  {
      int a;
  }d[2];
  
  int main()
  { 
      d[0].a=5;
      d[1]=d[0];
      if(d[0]==d[1])
      {
          printf("hello");
      }
  return 0;
  }
  </code></pre>
  
  <p>This code gives error</p>
  
  <pre><code>error: invalid operands to binary == (have 'struct demo' and 'struct demo')
  </code></pre>
  
  <p>Why this error is coming in Code 2 ?</p>