title: How can I use operators for object array elements?
body: <p>my main problem is I want to check whether an element of that object list is empty or not. </p>
  
  <p>If I use this I dont get any errors.</p>
  
  <pre><code>class A;
  A *pointer = new A;
  pointer = NULL;
  </code></pre>
  
  <p>but I need to do the same thing with object array elements. I get error when I use the code below.</p>
  
  <pre><code>    class A;
  A* pointer = new A[2];
  pointer[0] = NULL;
  
  </code></pre>
  
  <p>The error is no operator "=" matches these operands. I cant use </p>
  
  <pre><code> if(!ptr[0])
  
  </code></pre>
  
  <p>either.</p>