How to set the width of the exponent field for an ostream?
<p>This code:</p>

<pre><code>#include &lt;iostream&gt;
int main( int, char **argv )
{
std::cout &lt;&lt; 1.23e45 &lt;&lt; std::endl;
}
</code></pre>

<p>prints </p>

<blockquote>
  <p>1.23e+045</p>
</blockquote>

<p>when compiled with MS Visual Studio 2003, and</p>

<blockquote>
  <p>1.23e+45</p>
</blockquote>

<p>on my Linux machine. </p>

<p>How can I specify the width of the exponent field (and why is there a difference in the first place)?</p>
