cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Random number
Random number
Apr 22, 2013 at 9:47am UTC
kong288
(245)
Can someone tell me the best way to get a random number? Every way I use either doesn't work or works bad.
I have a C++11 compiler.
Apr 22, 2013 at 9:57am UTC
Catfish4
(666)
You may want to look into C++11's
random
library.
Be advised, some compilers may not yet fully implement it.
http://cplusplus.com/reference/random/
http://cplusplus.com/reference/random/random_device/operator%28%29/
Apr 25, 2013 at 5:26pm UTC
SamuelAdams
(1535)
Look at
http://www.cplusplus.com/reference/ctime/time/
http://www.cplusplus.com/reference/cstdlib/rand/
Topic archived. No new replies allowed.