My random numbers that output, output in the same sequence every time I run my game. Why is this happening?
I have
#include
You need to give the randum number generator a seed. This can be done by taking the current time, as this is hopefully some kind of random.
#include #include using namespace std; int main() { int r; srand(time(0)); r = rand(); return 0; }