| delorie.com/archives/browse.cgi | search |
| Xref: | news2.mv.net comp.os.msdos.djgpp:7950 |
| From: | "Chris A. Triebel" <cat AT sun4 DOT iol DOT unh DOT edu> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: DJGPP random blues |
| Date: | Tue, 27 Aug 1996 16:04:34 -0400 |
| Organization: | University of New Hampshire - Durham, NH |
| Lines: | 25 |
| Message-ID: | <Pine.SUN.3.91.960827160331.26621A-100000@sun4.iol.unh.edu> |
| References: | <01bb942b$d2fb26c0$0100007f AT hiway DOT co DOT uk DOT hiway DOT co DOT uk> |
| NNTP-Posting-Host: | sun4.iol.unh.edu |
| Mime-Version: | 1.0 |
| In-Reply-To: | <01bb942b$d2fb26c0$0100007f@hiway.co.uk.hiway.co.uk> |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
On 27 Aug 1996, Mark Gilbert wrote: > Date: 27 AUG 1996 17:21:53 GMT > From: Mark Gilbert <mark DOT gilbert AT pop3 DOT hiway DOT co DOT uk> > Newgroups: comp.os.msdos.djgpp > Subject: DJGPP random blues > > I can't figure rand() and random() out. They both seem positively un-random > giving out the same numbers every time. > > Does anyone know of a problem with these functions in DJGPP? > Does anyone know how to get them working? > -- > > Mark Gilbert > mark DOT gilbert AT pop3 DOT hiway DOT co DOT uk > http://ourworld.compuserve.com/homepages/chris_gilbert_10/scissor.htm > > You have to randomize(some_integer) to seed the randomizer otherwise it will. Try getting the time at the beginning of your program and using the seconds counter as the seed. cat
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |