🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Steve Brailsford Thu, 03 Sep 1992 13:16
help with Random class
#213
Author: Steve Brailsford
Date: Thu, 03 Sep 1992 13:16
13 lines
960 bytes
I see there is some kind of random number generator class
in g++ lib.  Can someone give me an example on how to use it?
It'd like say a random number between 10 and 20.  I think there
is a way to get it to do that, but haven't figured out how.
I wish there were some examples in the comments or something.
Man pages would be nice too. :-)

--
    Steve Brailsford (fsb@sparc.vitro.com)   _____
    Usenet:  uupsi!vitro!sparc!fsb         \/itro Corporation
    Voice:  (301) 231-1481                  14000 Georgia Ave.
    Fax:    (301) 231-2020                  Silver Spring, MD 20906
Re: help with Random class
#217
Author: Steve Brailsford
Date: Fri, 04 Sep 1992 14:57
20 lines
1334 bytes
fsb@sparc.vitro.com (Steve Brailsford) writes:

>I see there is some kind of random number generator class
>in g++ lib.  Can someone give me an example on how to use it?
>It'd like say a random number between 10 and 20.  I think there
>is a way to get it to do that, but haven't figured out how.
>I wish there were some examples in the comments or something.
>Man pages would be nice too. :-)

To answer my own question, I have found some examples in the
libg++ test directory.  The one in particular that applies here is
tRandom.cc
I see now it needs a distribution function and what functions are
available.  Pretty neat.  These classes still need man pages. :-)

--
    Steve Brailsford (fsb@sparc.vitro.com)   _____
    Usenet:  uupsi!vitro!sparc!fsb         \/itro Corporation
    Voice:  (301) 231-1481                  14000 Georgia Ave.
    Fax:    (301) 231-2020                  Silver Spring, MD 20906
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads