Mail Archives: djgpp/1998/08/27/22:32:40
Siddiqui wrote:
>
> I'm using allegro to do a little rendering type of thing, but gcc warns me:
>
> "Warning: type mismatch in implicit declaration
> for built-in function `sqrt' "
>
> and
>
> "Warning: type mismatch in implicit
> declaration for built-in function `cos' "
>
> It is refering to my use of the sqrt and cos. It warns me well intentonaly
> :) bcause my program crashes. The code is wrtten below:
You need to #include <math.h>, which declares `sqrt', `cos' and the
like. Otherwise, they default to functions returning int, which is
clearly wrong.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -