Cast error: Cannot cast Char to Int. 2