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