View Single Post
Old Nov 19th, 2007, 4:55 PM   #2
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,827
Rep Power: 5 Sane will become famous soon enough
Re: Complete Randomization

You have to give the random number generator an arbitrary starting point. This is most often done by passing the computer's epoch to "seed the random number generator". Since the epoch you give it will be different each time you start the program, the generator will then start with a different set of random numbers.

Read Random Numbers In Visual Basic. More specifically, sections "Initializing the Random Numbers" and "Repeating Random Numbers".

Hope that helps.
Sane is offline   Reply With Quote