More strtod troubles
Some time ago I got some help and the suggestion was given to use strtod to validate floating point input from a dialog box.
Now, I am well on my way writing this program when I realize that the user could very well wish to input zero and since the strtod function returns zero on failure this is probably not the best solution.
Why in the world would it return zero if zero could be a valid input? Am I missing the point?
What you had originally to check the validity of user input was fine - checking valid input and converting that input to a double are two different things. I would use both.
Don't forget about negative numbers....if that's valid input.
double val = strtod(pbuffer);
...for keeping me on the right track.