why not use atoi for short integers long and for floating point values use atof?
example
char str[] = "tek tips";
double x = atof(str);
int y = atoi(str);
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.