title: How to overload cout behaviour in C++?
body: <p>I would like to make cout will always print additional string (above and under) whenever I call it. It is weird to me because I use in Java and C# primarily.</p>
  <h2>Edit</h2>
  <p>Maybe we can define other value for &quot;y&quot; string or something like that?</p>
  <h2>Example</h2>
  <p>Code:</p>
  <pre><code>#include &lt;iostream&gt;
  int main(){std::cout&lt;&lt;&quot;y\n&quot;;}
  </code></pre>
  <p>result(printed):</p>
  <pre><code>x
  y
  z
  </code></pre>
  <p>I would not want to change <code>int main()</code> method just maybe overriding the <code>&lt;&lt;</code> for the string type?</p>
  <p>Or maybe make cout invoke additional method?</p>