<br>
<br>
I don't program personally. I prefer the hardware side of the universe ;-)<br>
However, I have a friend trying to learn C++, and asked if I might help. He<br>
is desperate. Anyway, his uncle tried to help him, and this is the gist of<br>
his message.......<br>
<br>
Remember, you are talking about a computer. Given the same<br>
>starting point, a computer will always generate the same sequence of<br>
>numbers from a random number generator. Secondly, the random<br>
number<br>
>generator does not start to evenly distribute the numbers until the<br>
>random number generator has run at least 50 times. The best way to<br>
make<br>
>the random number generator to be truly random is to run the generator<br>
>several times before you use the generator for your end purpose. My<br>
>favorite idea is to read the computer's clock, multiple the minutes<br>
>times the seconds, add the hours, add fifty, and run the random<br>
number<br>
>generator that many times before using the generator.<br>
><br>
<br>
My friend seems to want to find some c++ code that will do what is<br>
described above. It seems like it would only be a few lines of code, but<br>
again I am no programmer beyond just having had courses in college.<br>
Could anyone generate a few lines of code that will do the above?
<br>
I don't program personally. I prefer the hardware side of the universe ;-)<br>
However, I have a friend trying to learn C++, and asked if I might help. He<br>
is desperate. Anyway, his uncle tried to help him, and this is the gist of<br>
his message.......<br>
<br>
Remember, you are talking about a computer. Given the same<br>
>starting point, a computer will always generate the same sequence of<br>
>numbers from a random number generator. Secondly, the random<br>
number<br>
>generator does not start to evenly distribute the numbers until the<br>
>random number generator has run at least 50 times. The best way to<br>
make<br>
>the random number generator to be truly random is to run the generator<br>
>several times before you use the generator for your end purpose. My<br>
>favorite idea is to read the computer's clock, multiple the minutes<br>
>times the seconds, add the hours, add fifty, and run the random<br>
number<br>
>generator that many times before using the generator.<br>
><br>
<br>
My friend seems to want to find some c++ code that will do what is<br>
described above. It seems like it would only be a few lines of code, but<br>
again I am no programmer beyond just having had courses in college.<br>
Could anyone generate a few lines of code that will do the above?