title: undefined reference to `operator<<(std::ostream&, Zfraction)'
body: <p>im coding with dev c++ and i get this error "   $(CPP) $(LINKOBJ) -o $(BIN) $(LIBS)" in makefile.win file  with the message  undefined reference to `operator&lt;&lt;(std::ostream&amp;, Zfraction)' when i compile my project ! the weird thing is my code worked several hours before i add the operator+, is it a problem of compiler or something ?</p>
  
  <p>here is my header :</p>
  
  <pre><code>#ifndef DEF_FRACTION
  #define DEF_FRACTION
  
  #include &lt;iostream&gt;
  
  class Zfraction
  {
  public:
  
  Zfraction();
  Zfraction(int m_numerateur, int m_denominateur);
  Zfraction(int m_numerateur);
  void afficher(std::ostream &amp;flux) const;
  Zfraction&amp; operator+=(Zfraction const&amp; fraction);
  Zfraction add(Zfraction const&amp; fraction) const;
  
  private:
  
  int m_numerateur;
  int m_denominateur;
  
  };
  std::ostream&amp; operator&lt;&lt;(std::ostream &amp;flux, Zfraction fraction);
  Zfraction operator+(Zfraction const&amp; fraction1, Zfraction const&amp; fraction2);
  #endif
  </code></pre>
  
  <p>and for my cpp file :</p>
  
  <pre><code>#include "Zfraction.h"
  
  
  Zfraction::Zfraction()
  {
      m_numerateur=1;
      m_denominateur=0;
  }
  
  Zfraction::Zfraction(int numerateur, int denominateur)
  {
      m_numerateur=numerateur;
      m_denominateur=denominateur;
  }
  
  Zfraction::Zfraction(int numerateur)
  {
      m_numerateur=numerateur;
      m_denominateur=1;
  }
  
  void Zfraction::afficher(std::ostream &amp;flux) const
  {
      flux &lt;&lt; m_numerateur&lt;&lt;"/"&lt;&lt;m_denominateur;
  }
  
  std::ostream&amp; operator&lt;&lt;(std::ostream &amp;flux, Zfraction const&amp; une_fraction)
  {
      une_fraction.afficher(flux);
      return flux;
  }
  
  Zfraction Zfraction::add(Zfraction const&amp; fraction) const
  {
      Zfraction somme;
      somme.m_numerateur=(m_numerateur*fraction.m_denominateur)+(m_denominateur*fraction.m_numerateur);
      somme.m_denominateur=m_denominateur*fraction.m_denominateur;
      return somme;
  }
  
  Zfraction operator+(Zfraction const&amp; fraction1, Zfraction const&amp; fraction2)
  {
      Zfraction resultat;
      resultat = fraction1.add(fraction2);
      return resultat;
  }
  </code></pre>