title: overloading << with duplicate symbol linking error
body: <p>My head is near to explode. i can't understand that i'm doing wrong trying to overload the '&lt;&lt;' operator with two classes (punto and vector). Here is the code, the code is written in the class header file out of the classes:</p>
  
  <pre><code>   std::ostream&amp; operator &lt;&lt; (ostream&amp; salida, const punto&amp; origen)
      {   
          // Se escriben los campos separados por el signo
          salida &lt;&lt; "Punto --&gt; x: " &lt;&lt; origen.xf &lt;&lt; " , y: " &lt;&lt; origen.yf;
          return salida;
      }
  
      std::ostream&amp; operator &lt;&lt; (ostream&amp; salida, const vector&amp; origen)
      {
          // Se escriben los campos separados por el signo
          salida &lt;&lt; "Punto --&gt; x: " &lt;&lt; origen.p1.xf &lt;&lt; " , y: " &lt;&lt; origen.p1.yf;
              return salida;
      }
  </code></pre>
  
  <p>The error goes in the linking step and there is no double link with the class header because it's a so simple example.</p>
  
  <p><img src="https://i.stack.imgur.com/0d0CN.png" alt="enter image description here"></p>