Strange errors

Pages: 123
So then this code
void set_seed(int seed)

doesn't do anything for my program then correct? Unless I somehow call it in my initialize array function.
It will only help if it is called with time(nullptr) as is traditional.

Fun fact: rand is eventually going to be deprecated in favor of the new random generators ;)
Last edited on
yes sorry nullptr is the c++ standard not NULL. And yeah there are much better pseudo random generators than rand() but for beginners rand() is probably the easiest. Check out the others though

And I didnt see your srand(seed) that should work. I don't see why it wouldn't. The parameter for a seed is just an unsigned int.
Topic archived. No new replies allowed.
Pages: 123