title: Writing hex to a file
body: <p>I have a program that reads the <code>hex</code> of a file, modifies it, and stores the modified hex in a <code>std::string</code>.</p>
  <p>For example, how would I write this to a file</p>
  <pre class="lang-cpp prettyprint-override"><code>std::string wut=&quot;b6306edf953a6ac8d17d70bda3e93f2a3816eac333d1ac78&quot;;
  </code></pre>
  <p>and get its value</p>
  <pre class="lang-none prettyprint-override"><code>.0n..:j..}p...?*8...3..x
  </code></pre>
  <p>in the outputted file?</p>
  <p>I'd prefer not to use <code>sprintf</code>, but I guess if it's necessary, I'll do what I must.</p>