Multiply a constant to a complex & operator overloading problems
<blockquote>
  <p>Complex operator*(double m, const
  Complex &amp; c)
                         { return c * m; }</p>
</blockquote>

<p>*On the code above, i'm trying to multiply a constant to a complex number. i receive some errors one of them is [ binary 'operator <em>' has too many parameters]</em> </p>

<blockquote>
  <p>ostream &amp; operator&lt;&lt;(ostream &amp; os,
  Complex &amp; c) 
            {os &lt;&lt; c.real &lt;&lt;"," &lt;&lt; c.imaginary; return os;}</p>
</blockquote>

<p><strong>*</strong>Can you tell me what i did wrong on this line as well.
Thanks***** </p>

<pre><code>        #include &lt;iostream&gt;
        using namespace std;
        class Complex
        {
        private:
            double real;
            double imaginary;
        public:
            Complex();
            Complex(double r, double i = 0);
            Complex operator*(const Complex &amp; c) const;
            Complex operator*(double mult) const; 
           Complex operator*(double m, const Complex &amp; c)
                   { return c * m; }    
          ostream &amp; operator&lt;&lt;(ostream &amp; os, Complex &amp; c) 
        {os &lt;&lt; c.real &lt;&lt;"," &lt;&lt; c.imaginary; return os;}

        };
        Complex::Complex()
        {
            real = imaginary = 0;
        }

        Complex::Complex(double r, double i )
        {
            real = r;
            imaginary = i;
        }
        Complex Complex::operator*(const Complex &amp; c) const

        {
            Complex mult;
            mult.imaginary = imaginary * c.imaginary;
            mult.real = real * c.real;
            return mult;
        }

        Complex Complex::operator*(double mult) const
        {
            Complex result;
            result.real = real * mult;
            result.imaginary = imaginary * mult;
            return result;
        }
        int main()
        {
            Complex B(5, 40);
            Complex C(6, 15);
            cout &lt;&lt; "B, and C:\n";
            cout &lt;&lt; B &lt;&lt; ": " &lt;&lt; C &lt;&lt; endl;
            cout &lt;&lt; "B * C: " &lt;&lt; B*C &lt;&lt; endl;
            cout &lt;&lt; "10 * B: " &lt;&lt; 10*B &lt;&lt; endl;
            return 0;
        }
</code></pre>
