eduardo moretti

atof

Discussion created by eduardo moretti on Sep 8, 2009
Latest reply on Oct 28, 2009 by John Yamasaki

Hi, i write this simple code for mcf51jm128 and the compiler send this error

 

please help

 

 

 

" Link Error   : Undefined : "atof" Referenced from "main" in main.c "

and

Link Error   : Undefined : "atoi"  Referenced from "main" in main.c "

 

 

#include <stdlib.h>
static char s[] = "-49.3";

static char t[]= "125";

float f;

int i;

void main(void) {

  f = atof(s);
  i = atoi(t);
 

Outcomes