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 http://www.cplusplus.com/reference/random/
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.