title: How can I make a copy of a queue in C?
body: <p>I'm trying to COPY a queue into another queue in order that if I destroy one, it doesn't destroy the other one.</p>
  <p>I tried using <code>memcpy</code> this way:</p>
  <pre><code>memcpy(queue1, queue2, sizeof(queue2));
  </code></pre>
  <p>But I get the following error:</p>
  <blockquote>
  <p>expected ‘void * restrict’ but argument is of type 'Queue'</p>
  </blockquote>
  <p>Is it possible to copy one queue into another?</p>
  <p><strong>EDIT</strong></p>
  <p>This is the structure of the queue:</p>
  <pre><code>typedef char *Following;
  
  typedef struct _NodeQ {
      Following element;
      struct _NodeQ * next;
  } NodeQ;
  
  
  typedef struct {
      int error;
      NodeQ * first;
      NodeQ * last;
  } Queue; 
  </code></pre>