View Single Post
  #5 (permalink)  
Old 07-21-2008, 02:00 PM
MeTh0Dz|Reb0rn's Avatar   
MeTh0Dz|Reb0rn MeTh0Dz|Reb0rn is offline
My Posts Are Moderated
 
Join Date: Jul 2008
Posts: 17
Rep Power: 0
MeTh0Dz|Reb0rn is an unknown quantity at this point
Default Re: Random.. not actually random

That should output the same number everytime. If I am not mistaken, rand() takes the seed whatever it is and runs it through an algorithm then returns a value, so in theory a certain number should always return the same number. That is why you will often times see people using srand(time(NULL)), because the seconds change often enough that you won't often have repeated numbers unless your program runs for an extended period of time.

Hence by using the same seed you would be emulating this freezing.

Using something like memory, or characters in a text or something as the seed would require the freezing of the computer probably.
Reply With Quote

Sponsored Links