the above code (isnumber function) is suitable only for atoi function
to get an integer from string.

for atof you need some more changes
for instance you can only have one . in your string
you can have one - but only as the first char
for example -1.55

but if you want numbers like -10.5e-03 it wants some more things to implement.
still only one .
- can be 2
e can exist but it must be followed by + or - and at least one number after the signs.

happy coding!!
askmewhy25 like this