Greets, Artificial Stupidity, I'm Real Happy (to meet you).
> HI, does anyone know a good way to use rnd() to generate non-repeating
random numbers - in the area of about a thousand.
rand()%1000; // Gives a number from 0 - 999
Also, at the beginning of the program, do
srand(time(NULL));
This is to initialize (seed) the random number so that you get different
sequences everytime you run the program.
HTH.
________________________________________
Abhijit Shylanath
http://mudeth.tripod.com/
|