not having a go, dont worry! just saying that if there is anything that cant be sorted then a few people have discussed the topic of going both ways (b2d, d2b) on a different thread. btw where is the pow function defined ? is it in <cmath>? would certainly simplify my own code version... :)
Yes, pow() is in cmath, but likes to see doubles for arguments, or at least pow(2.0, k--)