-
October 3rd, 2003, 10:25 PM
#1
How to check whether a buffer contains a double number?
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|