delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/27/18:14:52

From: hat AT se-46 DOT wpa DOT wtb DOT tue DOT nl ()
Newsgroups: comp.os.msdos.djgpp
Subject: Re: real random numbers
Date: 26 Mar 1998 16:52:15 GMT
Organization: Eindhoven University of Technology, The Netherlands
Lines: 17
Message-ID: <6fe13v$55q@tuegate.tue.nl>
References: <351634A2 DOT 5ACD AT hol DOT fr> <35169C99 DOT 3B53 AT pobox DOT oleane DOT com>
Reply-To: a DOT hofkamp AT wtb DOT tue DOT nl
NNTP-Posting-Host: se-46.wpa.wtb.tue.nl
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <35169C99 DOT 3B53 AT pobox DOT oleane DOT com>,
	Francois Charton <deef AT pobox DOT oleane DOT com> writes:

> generating random looking maps). If you want a "true" (non replicable) 
> random series, you may want to use srand(time()) as a seed. 

As some people already have pointed out, this only works when your
program runs at least for a single second.
Does somebody know how to take care of getting a different value each
time you run a program, no matter how often in a single second you start
it ?


Albert
---
Sorry, no .sig
The sys admin wiped the previous sig, and I haven't invented a new one yet.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019