cplusplus.com cplusplus.com
cplusplus.com   C++ : Forums : General C++ Programming : random numbers
  Search:
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forums
Forums
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programm...
Articles
Lounge
Jobs

-

post  random numbers

asdfghjkl (8)
does any one know a library that can help me generate random numbers starting from a seed that can stor larger values than an int for example long long??
|
shereif102 (4)
u can use
#include<stdlib.h>

the function is rand()

i thibk that is all :D
|
rlskinner (5)
rand() is all you get on Windows

On Linux you get
int random()
double drand48()

random and drand48 take 8 or more bytes of seed state.

Or you can use Boost, and pick from several very good generators which have even larger seed state.
|

This topic is archived - New replies not allowed.
Home page | Privacy policy
© cplusplus.com, 2000-2009 - All rights reserved - v2.2
Spotted an error? contact us