|
-
April 25th, 1999, 02:19 AM
#1
Find my mistake with the random command
I'm writing a little routine that simulates the rolling of dice,
but it gives the same numbers in the same order every time
I run it, even if I recompile the code each time.
My random routine looks like
randomize();
roll=random(sides)+1;
I'm using Turbo C 4.5. Can you see any problem with the above?
I have stdlib.h and time.h included...
Thanks,
Jason F.
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|