how to change characters to numbers in c++ code example Example: char to int c++ int x = (int)character - 48;