int x = character - '0';  // The (int) cast is not necessary.