srand

Apr 21, 2011 at 8:06pm
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
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
help with what, man? you can use cplusplus's examples for this.
Topic archived. No new replies allowed.