How to move a ghost in PacMan game randomly around the maze?

I have tried rand() for x and y positions of ghost but does not work. it moves but not randomly it follows same path every time I run the code.
You need to seed the random number generator first. http://www.cplusplus.com/reference/cstdlib/rand/
If you're using C++11 http://www.cplusplus.com/reference/random/
I have done it but still it follows the same path :(
Topic archived. No new replies allowed.