title: Reverse an ostringstream by line
body: <pre><code>ostringstream ss;
  ss &lt;&lt; "(1,2)\n" &lt;&lt; "(1,3)\n" &lt;&lt; "(1,4)\n" ;
  cout &lt;&lt; ss.str();
  </code></pre>
  
  <p>should print the following:</p>
  
  <blockquote>
    <p>(1,2)  </p>
    
    <p>(1,3)  </p>
    
    <p>(1,4)  </p>
  </blockquote>
  
  <p>How could i reverse the output by line so that it prints:</p>
  
  <blockquote>
    <p>(1,4)</p>
    
    <p>(1,3)</p>
    
    <p>(1,2)</p>
  </blockquote>