title: explicit operator + in C++
body: <p>i'm just playing with the + operator &amp; i cannot figure out how to declare it and use it 'explicitly' 
  please help the code is below :</p>
  
  <pre><code>class compex{
  
      int real;
      int img;
  
  public:
      compex();
      compex(int,int);
      compex&amp; explicit operator + (const compex&amp; P1)
      friend ostream&amp; operator &lt;&lt;(ostream&amp; out,const compex&amp; R);
  };
  </code></pre>
  
  <p>and the implementation of the operator is:</p>
  
  <pre><code>  compex&amp; compex :: operator + (const compex&amp; P1)
   {
      this-&gt;real += P1.real;
     this-&gt;img += P1.img;
     return *this;
   }
  </code></pre>