[openbeos] is rand() really random?

  • From: "Andre Stark" <An.Stark@xxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Fri, 09 Apr 2004 23:18:44 +0200 CEST

Hello there,
this is not really an OBOS problem, but a BeOS one. Everytime i execute 
the following code:

for (int i = 0; i < 100; i++)
                cout << "Random:" << rand() <<endl;

the resulting values are exactly the same? Until now i do'nt know much 
about C++ programming, but normally random numbers are generated by 
including system time in some kind. How does this work on BeOS?

Greetings
  Andre Stark

Other related posts: