title: Compiler error when dynamically allocating a template class where type is another object of template type
body: <p>This is the compiler error that I am currently getting</p>
  
  <p>error C2679: binary '=' : no operator found which takes a right-hand operand of type 'Pair' (or there is no acceptable conversion)</p>
  
  <pre><code>using namespace std;
  
  template&lt;typename T, typename U&gt;
  Array&lt; Pair&lt;T, U&gt;&gt;* zip(Array&lt;T&gt; &amp; lhs,Array&lt;U&gt; &amp; rhs) 
  {
      int zipLen = (lhs.getLength() &lt; rhs.getLength() ? lhs.getLength() : rhs.getLength());
  
      Array&lt;Pair&lt;T, U&gt;&gt;* zipped= new Array&lt;Pair&lt;T,U&gt;&gt;(zipLen);
  
      for (int i=0; i&lt;zipLen; i++)
          zipped[i] = Pair&lt;T, U&gt;(lhs[i], rhs[i]);//and this is the line giving me problems
  
      return zipped;
  }
  
  int main()
  {
      Array&lt;int&gt; a1(5);
      Array&lt;char&gt;a2(3);
  
      Array&lt;Pair&lt;int,char&gt;&gt;*a3;
  
      for(int i =1;i&lt;5;i++)
          a1[i-1]=i;
  
      for(char ch='a';ch&lt;='c';ch++)
          a2[ch-'a']=ch;
  
      a3=zip(a1,a2);
  
      cout&lt;&lt;a3;
  
      system("pause");
      return 0;
  }
  </code></pre>