Re: How to make a random number
this is really off topic, but try reading a few bytes from /dev/random or
/dev/urandom. see random(4).
Alex Weiss (alexweiss@freesurf.ch) wrote:
> Hi folks,
> how do you generate random numbers in C? I know, there are functions in
> stdlib.h (rand, srand). But at every execution they generate the same
> number and that's bad for the purpose of my program.
> Do I have to use time and date functions?
>
> Thanks in advance,
>
> --
> Alex Weiss
> alexweiss@freesurf.ch
> www.gnu.org
> Software is like sex: it's better when it's free (Linus T.)
>
>
> --
> To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
--
(jacob kuntz) jake@{megabite,underworld}.net jpk@cape.com
(megabite systems) "think free speech, not free beer." (gnu foundataion)
Reply to: