delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/28/18:15:32

From: "Jason Nehf" <zolaar AT earthlink DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: random numbers in DJGPP (beginner ?)
Date: Sun, 28 Jun 1998 01:39:30 -0500
Organization: EarthLink Network, Inc.
Lines: 16
Message-ID: <6n6dpe$jvg$1@fir.prod.itd.earthlink.net>
NNTP-Posting-Host: 1cust239.tnt6.chi5.da.uu.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I am a real newbie to C/C++ and DJGPP, and i was wondering how to create
random numbers, in the style of

Pseudocode:

randomNum = random(int MaxNum);

where randomNum is the random number returned and MaxNum is the maximum
value for randomNum, and the possible range is 0 to MaxNum.  is there such a
routine, or will i have to build it from existing ones?  I've searched the
RHIDE syntax help file and none of the routines it gave me were really what
i was looking for.  Any help would be greatly appreciated.

Jason Nehf


- Raw text -


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