Jump to content

  • Log In with Google      Sign In   
  • Create Account


I need a good random numbers generator


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 HIND-D   Members   -  Reputation: 122

Like
Likes
Like

Posted 29 November 1999 - 09:32 AM

Does anyone have any idea about how to make a random number generator in C wich doesent return the same numbers all the time...?

Sponsor:

#2 Keebler   Members   -  Reputation: 126

Like
Likes
Like

Posted 29 November 1999 - 09:32 AM

If you seed the Random Number differently you will get a different set of "random" numbers. Using the time to seed the generator is a good way of doing this

#include
#include
#include
.
.
.

srand( (unsigned)time( NULL ) );

Taken from MSDN.

Keeb





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS