codice:
int char_to_int(char val)
{    
int x=0;
   x=(val-'0');
  return x;
}
ciao