View Single Post
Old 05-28-2009, 03:55 AM   #2 (permalink)
jamiemac2005
Design Team Member
 
jamiemac2005's Avatar
 
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,878
OS: Vista, various linux distros


Re: Rand function not random

Hey, the tutorial here will help you: http://www.cprogramming.com/tutorial/random.html

Basically, rand needs a seed from somewhere(usually the time, converted to seconds) in order to generate a random number, and if you don't set that seed then you'll always get the same output.

So read the tutorial, if it still does it(which it shouldn't) post back and include your code =]

Cheers,
Jamey
__________________

Myspace
jamiemac2005 is offline   Reply With Quote