getting an error in a program

Ric Moore wayward4now at gmail.com
Mon Jun 6 06:11:09 UTC 2011


On Mon, 2011-06-06 at 07:22 +0200, Nils Kassube wrote: 
> sudhanshu gupta wrote:
> > Its a IrisGL program I am attaching i am getting an error
> > 
> > sudhanshu at sudhanshu-laptop:~/isosurface$ gcc isonm.c
> > isonm.c: In function 'readFile':
> > isonm.c:142: warning: format '%d' expects type 'int *', but argument
> > 3 has type 'float *'
> 
> > Can anyone tell me how to remove that....
> 
> The error message tells you that for format '%d' there should be an int 
> object but you are using a float object. As you want to use a float 
> object you need format '%f'. Therefore change line 142 from
> 
> 			fscanf(infile,"%d",&coord);
> 
> to
> 
> 			fscanf(infile,"%f",&coord);
> 
> 
> Nils

I hope you get an "A" on that one, Nils! :) Ric


-- 
My father, Victor Moore (Vic) used to say:
"There are two Great Sins in the world...
..the Sin of Ignorance, and the Sin of Stupidity.
Only the former may be overcome." R.I.P. Dad.
Linux user# 44256 





More information about the ubuntu-users mailing list