www.delorie.com/archives/browse.cgi | search |
Date: | Thu, 20 Jun 1996 13:25:34 +0200 (IST) |
From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
To: | Nathan Kopp <nkopp AT grfn DOT org> |
Cc: | djgpp AT delorie DOT com |
Subject: | Re: How to get a good value for srand? |
In-Reply-To: | <4q9png$1u4@newsserv.grfn.org> |
Message-Id: | <Pine.SUN.3.91.960620132349.21348C-100000@is> |
Mime-Version: | 1.0 |
On 19 Jun 1996, Nathan Kopp wrote: > How do I get a good value for srand()??? Timer functions like rawclock() > are no good because they are always zero the first time you call them. The usual way to do this is by calling `time': #include <stdlib.h> #include <time.h> srand ((int)time ((time_t *)0));
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |