Converting an uint64 into a (full)hex string, C++
<p>I've been trying to get a <code>uint64</code> number into a string, in hex format. But it should include zeros. Example:</p>

<pre><code>uint i = 1;
std::ostringstream message;
message &lt;&lt; "0x" &lt;&lt; std::hex &lt;&lt; i &lt;&lt; std::dec;
...
</code></pre>

<p>This will generate:</p>

<pre><code>0x1
</code></pre>

<p>But this is not what I want. I want:</p>

<pre><code>0x0000000000000001
</code></pre>

<p>Or however many zeros a <code>uint64</code> needs.</p>
