× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Thu, Dec 4, 2008 at 22:39, Emily Smith <esmith@xxxxxxxxxxxxxxxxxxxx> wrote:
Could anyone shed any light as to how 'rand' works and why it doesn't seem to truly generate a random number? Is there something wrong with the program that uses 'rand' to generate the random number?

Now, i'm no programmer and i think this post would be better suited
for the RPG list, but my guess would be that you forgot to seed the
prng using srand().

Quick google search revealed this post:
http://www.tylogix.com/Articles/Using%20C%20Functions%20in%20RPG.htm

Which might just be what you're looking for (it's specific to rand(),
even though the URL doesn't say so).

Regards,

Lukas


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.