strtod vs NAN?
Larry Rosenman
ler at lerctr.org
Thu May 13 19:24:21 PDT 2004
--On Thursday, May 13, 2004 22:21:23 -0400 "Brandon S. Allbery KF8NH"
<allbery at ece.cmu.edu> wrote:
> On Thu, 2004-05-13 at 22:14, Larry Rosenman wrote:
>> char **ptr;
>>
>> num=strtod(input,ptr);
>
> Since ptr is uninitialized, strtod() is trying to store a pointer into
> random memory. You probably want to say this instead:
>
> char *ptr;
>
> num = strtod(input, &ptr);
Thanks. Stupid C error(s) from a novice :).
That was indeed it.
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler at lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040513/4846bf28/attachment.bin
More information about the freebsd-current
mailing list