Hi, I've got a problem with strtod() from the stdlib and I still don't get it. I cannot find the mistake.
Using the example from the online-help
void tst_strtod (void) { float f; char s [] = "1.23 other"; char *p; f = strtod (s, &p); printf ("strtod(%s) = %f\n", s, f); /* p points to " other" */ }
seems to work until I try to use the pointer p. It points somewhere but obviously not to " other". Adding the line
printf ("s = %p, p = %p\r", s, p);
shows
strtod(1.23 other) = 1.23 s = 3019E, p = 42F60000
Thanks for your Advice. I'm using C166 V6.04 Regards, Marcus