This will easily take care of the different input types and call _intCB function in case it gets integer input and will call _chrCB in other cases .
For defining our little variable “var” we can use following structure .