Just had a data structures class last semester... was working some exercises from the book in the chapter on recursion, and my code to "write a recursive function that converts a string to an int" does not give correct results... can't quite tell why... Any suggestions are appreciated
The problem is the pow function. It sometimes returns something like 9.999...
instead of 10, 99.999... instead of 100, etc... I suppose this would fix the problem: