Generally speaking, a character cannot represent an integer number. It can just represent a digit (you know an integer is a sequence of one
or more digits, possibly prefixed by the sign).
Even more so, a single character cannot represent a float or a double.
In order to tell the type
of a value represented by a string, your need to write a lexer (see
"Lexical analysis" at Wikipedia[
^]).