delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> |
List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
From: | "Ajit George" <gajit AT kurianinc DOT com> |
To: | <cygwin AT sourceware DOT cygnus DOT com> |
Subject: | RE: get random numbers in C++ : implicit declaration ???? |
Date: | Sun, 20 Feb 2000 21:11:15 -0600 |
Message-ID: | <000001bf7c19$5117bcc0$64b8bfa8@bertie.kurianinc.com> |
MIME-Version: | 1.0 |
X-Priority: | 3 (Normal) |
X-MSMail-Priority: | Normal |
X-Mailer: | Microsoft Outlook 8.5, Build 4.71.2377.0 |
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3155.0 |
Importance: | Normal |
In-Reply-To: | <NDBBIPGGDCHGPABJCBAJMEGHCAAA.Netzmeister@MartinHenne.de> |
Did you include stdlib.h? On linux the man pages state which header file prototypes the functions described. Ajit -----Original Message----- From: cygwin-owner AT sourceware DOT cygnus DOT com [mailto:cygwin-owner AT sourceware DOT cygnus DOT com] On Behalf Of Martin Henne Sent: Sunday, February 20, 2000 8:26 PM To: cygwin AT sourceware DOT cygnus DOT com Subject: get random numbers in C++ : implicit declaration ???? 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 AT martinhenne DOT de -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |