Floating Point Formates

Tim Kuehn timk at xenitec.on.ca
Thu Mar 1 08:01:22 AEST 1990


I'm working on a program and am having a problem with the atof() function.
Every time I run it with a certain option  turned on I get an error: 
scanf : floating point formats not linked.

The following code sample generates the same error. I've RTFM'd and there's 
not a HINT of anything else that should be brought in in terms of declerations,
etc. 

Anybody have any ideas?

-------code sample here-------
#include <stdio.h>
#include <math.h>
#include <conio.h>
 
char arg[10];
main()
{
clrscr;
printf("start \n");
strcpy(arg, "-f3");
printf("%s \n", arg);
printf("%lf \n", atof(&arg[2]));
}

+-----------------------------------------------------------------------------+
|Timothy D. Kuehn	       			       timk at xenitec.on.ca     |
|TDK Consulting Services			       !watmath!xenitec!timk  |
|871 Victoria St. North, Suite 217A					      |
|Kitchener, Ontario, Canada N2B 3S4 		       (519)-741-3623 	      |
|DOS/Xenix - SW/HW. uC, uP, DBMS. 		       Quality SW Guaranteed  |
+-----------------------------------------------------------------------------+



More information about the Comp.lang.c mailing list