🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

I need a good random numbers generator

Started by
0 comments, last by HIND-D 24 years, 7 months ago
Does anyone have any idea about how to make a random number generator in C wich doesent return the same numbers all the time...?
Jonatan Hedborg
Advertisement

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

This topic is closed to new replies.

Advertisement