You can use a stringstream to convert back to an integer, but that doesn't work if the number is too big to fit. What are you trying to do in specific?
Firstly you would need to use a long long int (log(2, 10^15) ~=~50). secondly a quick and simple Google will help you with stringstreams. Post some code if you get stuck.