From: "Tom St Denis" Newsgroups: comp.os.msdos.djgpp References: <591c995d39584286 DOT 39584286591c995d AT poczta DOT arena DOT pl> Subject: Re: random generator Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 Message-ID: Date: Tue, 17 Jul 2001 10:48:47 GMT NNTP-Posting-Host: 24.112.8.23 X-Complaints-To: abuse AT home DOT net X-Trace: news3.rdc1.on.home.com 995366927 24.112.8.23 (Tue, 17 Jul 2001 03:48:47 PDT) NNTP-Posting-Date: Tue, 17 Jul 2001 03:48:47 PDT Organization: Excite AT Home - The Leader in Broadband http://home.com/faster To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Jan Kowalski" wrote in message news:591c995d39584286 DOT 39584286591c995d AT poczta DOT arena DOT pl... > Hi ! > > I have some problems with random generator. I use rand() function to > generate random valua. When I start my program evrey time its generates > the same value. What am I doing with it ? :( You have to see the generator try adding srand(time(NULL)); to the beginning of your program. Tom