Strictly speaking, you can do this: (int) pointer.
However, you are probably looking for the atoi and atof functions.
atoi is a function that converts a char * pointing to a string containing an integer in the decimal value of an integer.
atof is similar for double.
source share