Displaying 1 result from an estimated 1 matches for "strotd".
2007 Jul 14
3
Strange C programming problem
...ut I can't believe
strtof (et al) are broken, so I must be doing something wrong. However,
I've spent hours looking at this and comparing it to the man pages and
don't see what I'm doing wrong. strtod() and strtold() also give equally
wrong results. (the example program given on the strotd man page works
fine, BTW.)
Can someone wield a clue-bat please? :)
Here's the program:
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <errno.h>
int main (int argc, char ** argv)
{
float ldbl = 0.0;
char * endp;
printf ("%s\n", argv[1...