It was up earlier, don't know why it was taken down...
From what I saw of it, the problem with "number" is that it was a parameter in a function that was passed by value. However, in the function it is used to store and return an integer. Since it's passed by value instead of reference, this basically means nothing happens.
I didn't post earlier because I was hoping someone else would figure out the problem with the output. It was using the printf function with cstrings, but the implementation looked fine to me. The description of the problem makes me think that there should be something wrong with the address or variable of the cstring.