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
srand
srand
Apr 21, 2011 at 8:06pm UTC
zk123
(1)
hi
i'm making a battleships game in c++ and i want to use the srand to place the battleships in random places and random direction (i.e. facing north, south, east, west)
please help
thankyou
Apr 21, 2011 at 8:07pm UTC
Athar
(4466)
Help with what? srand just initializes the PRNG, rand() generates numbers.
http://www.cplusplus.com/reference/clibrary/cstdlib/rand/
http://www.cplusplus.com/reference/clibrary/cstdlib/srand/
Apr 21, 2011 at 9:28pm UTC
andrezc
(61)
help with what, man? you can use cplusplus's examples for this.
Topic archived. No new replies allowed.