How to find the phototype of function "drand48()"
Andrea 'Fyre Wyzard' Bocci
fwyzard@inwind.it
Wed Nov 14 10:25:00 GMT 2001
At 21.39 23/11/01 (GMT +0000), kan zheng wrote:
>Dear Sir/Madam,
>
>Now I have two workshop to rum my C codes, one is VC++, another is gcc2.952.
>There is one function "drand48()" in my program, this function is only found
>at stdlib.hhen using gcc, not at stdlib.h when using gcc.
I did not understand this passage.
>So I have to find the definition of that function.
>
>Could you please provide it or tell me where I can find it?
From "Linux Programmer's Manual" man pages, the prototype is:
double drand48(void);
However, these functions conform to "SVID 3" (which meaning I don't know),
and (citing the manpages) :
"These functions are declared obsolete by SVID 3, which states that
rand() should be used instead."
So, maybe VC++ library does not have it; if this is true, even defining the
function prototype will get you nowhere.
If you want to use both compilers, you should switch to use rand().
HTH
fwyzard
More information about the Gcc
mailing list