Hi,

the rand functions returns a pseudo random number. In the C Book from K&R you 
can find an example implementation which you can use.
You can find other in the book "Numerical Recipes in C" and via google.

A simple way to produce true random numbers is to increase the internal counter 
of the function with interrupts. This works good if the reading is asynchronous 
to the interrupts.

Rolf

-----------------------------------------------------------------------------------------------
mspgcc-users@lists.sourceforge.net schrieb am 22.07.03 16:27:29:
> 
> Hi
> 
> Sorry if this has been covered previously.  I was wondering if the rand() 
> or random() functions are supported (and how to access them).
> I am using mspgcc for windows.  I've included stdio.h and stdlib.h but the 
> calls to rand() or random() have been unsuccessful.
> 
> Thanks
> 
> Dipak
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a single machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
> same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users




Reply via email to