This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to find the phototype of function "drand48()"


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]