|
楼主 |
发表于 2005-5-24 19:17:45
|
显示全部楼层
thank you.mozilla.use the "gcc xxx.c -o xxx -lm"can work fine.but I want know what's mean is '-lm'.
here is another same question:
#include <stdio.h>
#include <math.h>
main()
{
int x,k;
printf("please enter the value of x\n");
scanf("%d",&x);
printf("%d\n",x);
k = fabs(x);
printf("the x = %d k = %d\n",x,k);
printf("now x = %d\n",x); /***here work fine.***/
printf("fabs(x) = %d\n",fabs(x)); /***but here work worng,the result is fabs(x) = 0.why?****/
return 0;
}
thank you. |
|