I don't program personally. I prefer the hardware side of the universe ;-) However, I have a friend trying to learn C++, and asked if I might help. He is desperate. Anyway, his uncle tried to help him, and this is the gist of 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 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 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 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 described above. It seems like it would only be a few lines of code, but again I am no programmer beyond just having had courses in college. Could anyone generate a few lines of code that will do the above?
<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 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 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 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 described above. It seems like it would only be a few lines of code, but again I am no programmer beyond just having had courses in college. Could anyone generate a few lines of code that will do the above?