[LCP]Problem with stdlib

mehul radheshyam choube mehulchoube_cprog at rediffmail.com
Thu Jan 24 15:09:15 UTC 2002


> I am using rand() function in Linux RH 7.1 by including 
> stdlib.h but i am
> getting the following error:
> 
> /usr/include/stdlib.h:398:29: macro "random" requires 2 
> arguments, but
> only 1 given

   if u look into the stdio.h the prototype for rand() is as follows :-

/* Return a random integer between 0 and RAND_MAX inclusive.  */
extern int rand (void) __THROW; 

and prototype of random() is as follows :-

/* Return a random long integer between 0 and RAND_MAX inclusive.  */
extern int32_t random (void) __THROW; 


mehul.

>_________________________________
> This is the Linux C Programming List
> :  http://lists.linux.org.au/listinfo/linuxcprogramming 
> List
 




More information about the linuxCprogramming mailing list