delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/06/13:34:11

From: "-hs-" <email DOT invalid AT server DOT invalid>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: random
Date: Sat, 6 May 2000 19:33:48 +0200
Lines: 18
Message-ID: <8f1l1t$alm$1@news3.isdnet.net>
References: <FnkQ4.3913$v41 DOT 8791168 AT nnrp5 DOT proxad DOT net>
NNTP-Posting-Host: r76m233.cybercable.tm.fr
Mime-Version: 1.0
X-Trace: news3.isdnet.net 957634429 10934 195.132.76.233 (6 May 2000 17:33:49 GMT)
X-Complaints-To: abuse AT isdnet DOT net
NNTP-Posting-Date: 6 May 2000 17:33:49 GMT
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Muadib a écrit dans le message ...
>Which function can give a random integer?

The standard function is rand(). You can change the seed with srand().
(<stdlib.h>)
Consult the C-FAQ for a good use of these functions

CLC-FAQ: http://www.eskimo.com/~scs/C-faq/top.html
13-15 13-16
--
-hs- "Stove"
CLC-FAQ: http://www.eskimo.com/~scs/C-faq/top.html
ISO-C Library: http://www.dinkum.com/htm_cl
"Show us your source code, and let us, like
rapacious vultures half-crazed by starvation, rip it to shreds until
there's practically nothing left" --Richard Heathfield CLC


- Raw text -


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