title: How can I add the value at the beginning of queue
body: <p>I have a queue that defined as</p>
  
  <pre><code>queue&lt;CData*&gt; queue1;
  </code></pre>
  
  <p>In which class CData is</p>
  
  <pre><code>typedef unsigned char  U8;
  typedef unsigned int   U32;
  
  class CData
  {
  private:
      U8* m_Data;
      U32  m_Len;
  public:
      CData(void) : m_Data(NULL), m_Len(0)
      {
      }
      ~CData(void)
      {
          FreeData();
      }
      void FreeData()
      {
          if (m_Data)
          {
              delete[] m_Data;
              m_Data = NULL;
          }
      }
  };
  </code></pre>
  
  <p>I assume that my queue1 is initialized values as the bellow code</p>
  
  <pre><code>for (U32 k = 0; k&lt;5; k++)
  {
      size_t data_size = 1;
      U8 *data_buf = new U8[data_size];
      for (size_t i = 0; i &lt; data_size; ++i)
      {
          data_buf[i] = k;
      }
      CData* result = new CData(data_buf, data_size);
      queue1.push(result);
      delete[] data_buf;
      data_buf = NULL;
  }
  </code></pre>
  
  <p>Now, my queue1 will contain the value</p>
  
  <pre><code>0 1 2 3 4
  </code></pre>
  
  <p>My question is that how can I insert 3  number of zero values at the beginning of the queue1, so that the result will be</p>
  
  <pre><code>0 0 0 0 1 2 3 4
  </code></pre>
  
  <p>Second, How can i free/delete queue1 , after the application done. And if I used </p>
  
  <pre><code>CData* result = new CData(); 
  </code></pre>
  
  <p>How can I delete <code>result</code> variable? I am using C++ in Ubuntu. Thanks in advance. </p>