ummm, I don't know c++, but I do know that "10" is a string and not an char
I think you have to get each char of the string starting from the right and multiply it by the right power of 10. (in the case 223, you have 3 x 10 ^ 0 + 2 x 10 ^ 1 + 2 x 10 ^ 2)
And if it just an ascii value like "1" or "2", you just have to subtract the right value from the ascii code (which you get when you do just a (int) cast.) So if you get 9999 for a value of 1, then subtract 9998 from it and you get the right values for 2, 3, 5,6 , etc... but I don't have the ascii chart memorized right off hand
