[LCP]Rounding questions

Mike & Penny stepbystepfarm at shaysnet.com
Sat Sep 7 07:16:06 UTC 2002


>
> Thank you!  This works.  Do you happen to know why rint() works without
> doing this?  I can't seem to find a prototype for it anywhere, including
> math.h.
>

 Chuck,
     Here are some questions to ask yourself that might help explain:

    1) What is the type returned by rint?
    2) What is the type returned by round?
    3) What is the default (the type the compiler will assume is returned if
it can't find a prototype for a function)?
    4) What are the consequences of forgetting the prototype of a function
that return integer?
    5) What are the consequences of forgetting the prototype if the function
does NOT return integer?

    Does that help?

Michael






More information about the linuxCprogramming mailing list