get random numbers in C++ : implicit declaration ????

Martin Henne Netzmeister@MartinHenne.de
Sun Feb 20 18:27:00 GMT 2000


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



More information about the Cygwin mailing list