title: IO operator overloading error
body: <p>In .h file</p>
  
  <pre><code>ostream&amp; operator &lt;&lt;(ostream &amp;os,const object &amp;);
  </code></pre>
  
  <p>In .cpp file</p>
  
  <pre><code>ostream&amp; operator &lt;&lt;(ostream &amp;os,const object &amp;mono)
  {
      os &lt;&lt; mono.coef&lt;&lt;" *X^"&lt;&lt;mono.degree;
      return os;      
  }
  </code></pre>
  
  <p>Errors I am getting:</p>
  
  <blockquote>
    <p>error C2143: syntax error : missing ';' before '&amp;'<br>
    error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
    error C2061: syntax error : identifier 'ostream'<br>
    error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 
    error C2805: binary 'operator &lt;&lt;' has too few parameters  </p>
  </blockquote>
  
  <p>I've checked every IO overloading tutorial I can found yet I cannot fix this.</p>
  
  <p>EDIT: adding std:: fixed every error except "> error C2805: binary 'operator &lt;&lt;' has too few parameters  "
  I dont know what that means</p>
  
  <p>EDIT2: declaring function as a friend solved this.
  thanks everyone!</p>