Actually I had read a few quite a few "srand call only once" posts and of course everyone's helpful hints. The devil is in the details as they say. It wasn't my intention to continually call srand...
Type: Posts; User: Newton
Actually I had read a few quite a few "srand call only once" posts and of course everyone's helpful hints. The devil is in the details as they say. It wasn't my intention to continually call srand...
Hi,
The cause of my problems is that I am an idiot. Instead of calling srand once in the main program of my project I was calling it repeatedly in the function called from the main program. I have...
Hi again,
I introduced a sleep for 1 second and it does look more random. Surely there has to be a better way??
Thx, N.
Well master5001 I tried your suggestion but no dice (so to speak). I believe matsp is correct (thanks for the background info). My program runs endlessly through the same sequence of integers but...
Thanks master5001 but I tried your idea and get the same repeated streams of integers with each iteration of the while loop (NB that with each run of the progam and therefore a new seed I get a...
Thanks for writing in mike_g. Maybe I don't understand the process of random number generation as well as I thought. I also read that you should only seed once but if you seed rand once what is the...
Hi,
I need to be able to quickly generate reasonably random numbers i.e. not a series of numbers produced at one time but successive new random integers between 0 and 8 inclusive. I think my...