char to int conversion on cpp code example
Example 1: converting char to integer c++
int x = '9' - 48;
// x now equals 9 as an integer
Example 2: convert char to int c++
int x = character - '0'
int x = '9' - 48;
// x now equals 9 as an integer
int x = character - '0'