C++ How do I convert Hex Integer to String?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5290089/how-to-convert-a-number-to-string-and-vice-versa-in-c">How to convert a number to string and vice versa in C++</a>  </p>
</blockquote>



<p>In C++ how do you convert a hexadecimal integer into a string representation of the decimal value of the original hex?</p>

<p>Let us say we have an integer whose hexadecimal representation is <code>a1a56</code> (which in decimal equals <code>662102</code>) and you want to convert this to a string "662102"</p>

<p>How would you solve this?</p>

<p>ps: i suggest a functional solution as an answer, feel free to shoot it down (in a polite manner, if possible)</p>
