title: How can I use cout << myclass
body: <p><code>myclass</code> is a C++ class written by me and when I write:</p>
  
  <pre><code>myclass x;
  cout &lt;&lt; x;
  </code></pre>
  
  <p>How do I output <code>10</code> or <code>20.2</code>, like an <code>integer</code> or a <code>float</code> value?</p>