Mail Archives: djgpp/1998/01/01/02:32:29
Ok, I have a little problem here... it seems I can't get DJGPP to
generate a random number. I tried using something like srandom(34) then
using r=random() and printf("%d", r), but it would always give me a
large six or more digit number, and when I use rand() it would always
give me a zero. Say I wanted a random number from 1 to 10, how would I
do it? And also, how can I make it so that srandom takes a different
seed every time the program is run, so that I get a different number
each time?
Thanks for any help you can give.
--
Suddenly, I heard a tapping... as of someone gently rapping, rapping at
my chamber door. You heard me rapping, right? --The Crow
- Raw text -