VC++ has it Generates a pseudorandom number. Routine Required Header rand <stdlib.h>
int rand( void ); Libraries All versions of the C run-time libraries. Return Values rand returns a pseudorandom number, as described above. There is no error return. Remarks The rand function returns a pseudorandom integer in the range 0 to RAND_MAX. Use the srand function to seed the pseudorandom-number generator before calling rand. Regards Bharath Ian Abbott wrote: > On 27 Nov 2001, at 15:16, Hrvoje Niksic wrote: > > > So, does anyone know about the portability of rand()? > > It's in the ANSI/ISO C spec (ISO 9899). It's always been in UNIX > (or at least it's been in there since UNIX 7th Edition), and I > should think it's always been in the MS-DOS compilers, but I don't > have one handy at the moment. > > It tends not to be very random in some implementations, but should > be good enough to implement a random wait.