cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/04/22:16:07

From: Gallicus AT caramail DOT com (Gallicus)
Newsgroups: comp.os.msdos.djgpp
Subject: ? RandomInteger ?
Date: Sun, 04 Apr 1999 14:19:05 GMT
Organization: Wanadoo - (Client of French Internet Provider)
Lines: 28
Message-ID: <370874d5.31997731@news.wanadoo.fr>
NNTP-Posting-Host: b-adsl-nice-1-106.abo.wanadoo.fr
Mime-Version: 1.0
X-Newsreader: Forte Agent 1.5/32.452
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I need to create with Djgpp C++ a function which returns very very long
random Integers > min  and < max.
I use the Integer.h  and RandomInteger class.

#include<iostream>
#include <Integer.h>

Integer alea (Integer min, Integer max)
  {
    ??????
     return RandomInteger;   
  }

int Main()
{ 
  Integer rndIntgr, min, max;
 min = 1000000000000000000000;
max =100000000000000000000000000000000000;
 rndlIntgr = alea(min, max);
??????
cout << alea;
}
  
I don't know how to use the RandomInteger class nor the Random Generator.
Coud you help me and fill up what is missing ?

TIA.
Gallicus.

- Raw text -


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