Possible Duplicate:
How to convert a number to string and vice versa in C++
In C++ how do you convert a hexadecimal integer into a string representation of the decimal value of the original hex?
Let us say we have an integer whose hexadecimal representation is a1a56
(which in decimal equals 662102
) and you want to convert this to a string "662102"
How would you solve this?
ps: i suggest a functional solution as an answer, feel free to shoot it down (in a polite manner, if possible)