title: Implement complex number's class in C++
body: <p>Here I am trying to implement a class for complex numbers using books and the Internet. Here is the code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;ostream&gt;
  using namespace std;
  class  Complex{
      private:
          float re,im;
  
      public:
          Complex(float x,float y){
              re=x;
              im=y;
          }
  
          float Re() const{
              re;
          }
  
          float Im() const {
              return  im;
          }
  
          Complex&amp;  operator*=(const Complex&amp; rhs){
              float t=Re();
              re = Re()*rhs.Re()-Im()*rhs.Im();
  
              im = t*rhs.Im()+Im()*rhs.Re();
              return *this;
          }
  };
  
  ostream&amp; operator&lt;&lt;(ostream&amp; t,const Complex&amp; c){
      t &lt;&lt; c.Re() &lt;&lt; " " &lt;&lt; c.Im(); 
      return t;
  }
  
  int main(){
      Complex s(3.45,23.12);
      return 0;
  }
  </code></pre>
  
  <p>It compiles fine, but I can't find a way to print the real and imaginary parts of the number on the screen?</p>