title: Beginner Removing first element from an array of structs (C)
body: <p>I have an array of structs (actually it's a heap array sorted by priority).</p>
  
  <pre><code> typedef struct {
      char name[MAX_CHARACTERS+1];
      int priority;
  } person;
  person p[MAX_HEAPSIZE+1];
  </code></pre>
  
  <p>and want to remove the first element in the array.  I'm not sure how or what command to use.</p>
  
  <p>So far, I've been doing </p>
  
  <pre><code>void remove(){
      swap(0, heapsize-1);
      strcpy(p[heapsize-1].name, p[MAX_HEAP_SIZE+1].name);
      p[heapsize-1].priority = p[MAX_HEAP_SIZE+1].priority;
  }
  </code></pre>
  
  <p>this swaps the first and last non-empty element in the array.  Then it tries to copy the data at an empty element to the last non-empty element (element i want to remove) in the array.</p>
  
  <p>but I think it only copies the memory positions.  Is there something simple where I can do</p>
  
  <p>p[0] = NULL?  </p>