convert char to unsigned int c++ code example Example: converting char to integer c++ int x = '9' - 48; // x now equals 9 as an integer