You can convert a character digit to a numerical digit using the following:

char charDigit = '3';

int digit = charDigit - '0'; // this is the same as digit = 3;

Next note that the number 239 = 2 * 100 + 3 * 10 + 9

In general, in a base-10 number system, a number equals:

sum(digit n * 10 ^ n) from n = (num digits - 1) to 0.

From here you should be able to write a simple algorithm to turn a string of numerical characters into an integer.

- Ben