Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sourceware.cygnus.com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin@sourceware.cygnus.com>
List-Help: <mailto:cygwin-help@sourceware.cygnus.com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner@sourceware.cygnus.com
Delivered-To: mailing list cygwin@sourceware.cygnus.com
Reply-To: <Netzmeister@MartinHenne.de>
From: "Martin Henne" <Netzmeister@MartinHenne.de>
To: <cygwin@sourceware.cygnus.com>
Subject: get random numbers  in C++ : implicit declaration ????
Date: Mon, 21 Feb 2000 03:25:49 +0100
Message-ID: <NDBBIPGGDCHGPABJCBAJMEGHCAAA.Netzmeister@MartinHenne.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300



I tried to get random numbers in a C++
programm with the two functions
  
  srand(number)      // to initialize
  x=rand()           // to get a number

but the compiler gives me a warning that
says 'implicit declaration of function 'srand()''
and the same for 'rand()'. Is there another
way to get random numers in C++? I'm asking
because under linux the compiler will stop com-
piling. It is a error for the g++-compiler
that comes with the debian potato. After I
installed egcs, I got a warning, but the 
compiling finished.

Under Cygwin its also a warning and no error.



Martin

PS.: I included the iostream.h and the time.h



mailto:webmaster@martinhenne.de


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

