title: Error C2100 - Illegal Indirection
body: <p>I have a very simple program written to define a * operator in an array template class.
  When I try to compile it gives me an error "illegal indirection".
  Any help on the matter would be greatly appreciated!</p>
  
  <p>This is the operator definition:</p>
  
  <pre><code>template &lt;typename T&gt;                                                                   
  NumericArray&lt;T&gt; NumericArray&lt;T&gt;::operator * (const int factor) const
  {
  NumericArray&lt;T&gt;* TempArray2 = new NumericArray&lt;T&gt;(Size());
  for (int i=0; i&lt;Size(); i++)
  {
      *TempArray2[i] = ((GetElement(i))*(factor));
  }
  return *TempArray2;
  }
  </code></pre>
  
  <p>And this is the implementation in the test main function:</p>
  
  <pre><code>cout&lt;&lt;((*intArray1)*5).GetElement(0);                                   
  cout&lt;&lt;((*intArray1)*5).GetElement(1);
  cout&lt;&lt;((*intArray1)*5).GetElement(2);
  </code></pre>
  
  <p>Any ideas?</p>