title: Operations with complex numbers
body: <p>I'd like to know how to perform some simple operations with complex numbers without using the real and the imaginary parts separately.</p>
  
  <p>Example:</p>
  
  <pre><code>complex&lt;double&gt; A(0.0, 1.0);
  complex&lt;double&gt; B;
  B = A * 2 + A;
  </code></pre>
  
  <p>It doesn't compile:</p>
  
  <blockquote>
    <p>error C2678: binary '*' : no operator found which takes a left-hand operand of type 'std::complex' (or there is no acceptable conversion)).</p>
  </blockquote>
  
  <p>I read it's a problem of conversion.  It's a real problem, especially in the case of more complex code.</p>
  
  <p>Is there a way to do operations with complex numbers?</p>