title: How to check for NULL in c++?
body: <p>Let say for example, I have a struct, and an array of the struct. What I want to do is to iterate through the array and check if any of the item is a null. I tried checking the item against NULL and (struct *) 0, that don't seem to work. Is there any reliable way to check for null value?</p>
  
  <p>UPDATE Sample Code</p>
  
  <pre><code>struct Test{
   int a;
  };
  
  Test testArray[size];
  
  for (int i = 0; i &lt; testCount; i++)
  {
      if (testArray[i] == NULL) //this doesnt work
      {
      }
  }
  </code></pre>
  
  <p>Thanks,</p>
  
  <p>RWendi</p>