#: 5008 S3/Languages
08-Jul-90 22:05:17
Sb: #4998-still sqrt() problems
Fm: James Jones 76257,562
To: Zack Sessions 76407,1524 (X)
Because C lets you sleaze out and not declare functions, assuming them to
return int. sqrt() doesn't return an int, it returns a double--so the code
generated for main probably snarfs the least-significant sixteen bits of the
double returned and treats it like an int, which probably gives you a zero.
Either explicitly declare "double sqrt();" or put in the directive "#include
".
{{_
|