If you only need to use one digit integers, you can cast the char into an int. Then, subtract 48 from the int value. If the value is more than one int, you can use the same idea but it will be more complicated.