delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/28/16:15:17

From: Martin Ambuhl <mambuhl AT earthlink DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: randomize
Date: Thu, 28 Jan 1999 15:14:23 -0500
References: <36B0646E DOT AAD42056 AT ort DOT org DOT il>
X-Posted-Path-Was: not-for-mail
X-Accept-Language: en
X-ELN-Date: 28 Jan 1999 20:14:22 GMT
X-ELN-Insert-Date: Thu Jan 28 12:15:23 1999
Organization: Nocturnal Aviation
Lines: 15
Mime-Version: 1.0
NNTP-Posting-Host: 1cust198.tnt14.nyc3.da.uu.net
Message-ID: <36B0C51F.275DDF5E@earthlink.net>
X-Mailer: Mozilla 4.5 [en] (Win95; I)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Sara Berger wrote:
> 
> in Borland C++ there is the function "randomize()"  which generates a
> new random number/s everytime it`s used.
> I cant find this function in djgpp so I cant generates new random
> numbers.

There is no standard C function randomize().  If you need it, use
#include <time.h>
#define randomize() srand(time(0))


-- 
Martin Ambuhl (mambuhl AT earthlink DOT net)
Note: mambuhl AT tiac DOT net will soon be inactive

- Raw text -


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