title: Equivalent of %02d with std::stringstream?
body: <p>I want to output an integer to a <code>std::stringstream</code> with the equivalent format of <code>printf</code>'s <code>%02d</code>. Is there an easier way to achieve this than:</p>
  
  <pre><code>std::stringstream stream;
  stream.setfill('0');
  stream.setw(2);
  stream &lt;&lt; value;
  </code></pre>
  
  <p>Is it possible to stream some sort of format flags to the <code>stringstream</code>, something like (pseudocode):</p>
  
  <pre><code>stream &lt;&lt; flags("%02d") &lt;&lt; value;
  </code></pre>