title: Vector error , cannot get push_back to work
body: <p>This is just a snippet of the uncommented code. The packing vector keeps causing an error at the <code>push_back()</code>, and I'm not quite sure why:</p>
  
  <p><strong>EDIT:</strong> It has been updated to say  </p>
  
  <pre><code>vector&lt;BinTreeNode&lt;HuffmanToken&lt;Pixel&gt;* &gt; &gt; packing = new vector&lt;BinTreeNode&lt;HuffmanToken&lt;Pixel&gt; &gt; &gt;();
  </code></pre>
  
  <p>however, there is still the allocator error even with the adjusted templates. </p>
  
  <blockquote>
    <p>no matching function to call std::vector  , std::allocator  > > :: push_back(BinTreeNode > >&amp;</p>
  </blockquote>
  
  <pre><code>BinTree&lt;HuffmanToken&lt;Pixel&gt; &gt;* Huffman::buildTree(const vector&lt;HuffmanToken&lt;Pixel&gt;&gt;&amp; tokens) {
  
  BinTreeNode&lt;HuffmanToken&lt;Pixel&gt; &gt;* g1 = new BinTreeNode&lt;HuffmanToken&lt;Pixel&gt; &gt;();
  BinTreeNode&lt;HuffmanToken&lt;Pixel&gt; &gt;* g2 = new BinTreeNode&lt;HuffmanToken&lt;Pixel&gt; &gt;();
  BinTreeNode&lt;HuffmanToken&lt;Pixel&gt; &gt;* g3 = new BinTreeNode&lt;HuffmanToken&lt;Pixel&gt; &gt;();
  
  vector&lt;HuffmanToken&lt;Pixel&gt; &gt; packing ;
  
  vector&lt;HuffmanToken&lt;Pixel&gt; &gt;::const_iterator it;
  
  it = tokens.begin();
  
  for(int i = 0; i &lt; tokens.size(); i++) {
    g1 -&gt; setValue(tokens.at(i));
    packing.push_back(g1);
  }
  </code></pre>