Hello, everyone!

How to use C (not C++) to check whether a character buffer (char*) contains a double or float number? I want to know how to check it with standard C (not C++) method and not VC++ specific method.

For example,

----------
char buf1 [5] = "123.4";
char buf2 [5] = "123.m";
----------

What the result I want to get is, when I input buf1, I can get TRUE and when I input buf2, I can get FALSE.

I find the function atof is not working properly.


Thanks in advance,
Geo