1

I would like to convert a char* into an integer or double with error handling. Currently the functions I am using do not support error handling and do not give me any feedback on whether or not the string I gave to the functions was valid. Is there a way to do this in C?

int integer = atoi(str);
double flt = atof(str);

0 Answers0