I'm having a bit of trouble using the random function rand(). It does kinda generate random numbers but its always the same numbers in the same order when the program starts. I read about this somewhere before but i couldnt get anything from searching the forum. The header i am using is just iostream.
Heres where I am using the function:
I want a random number between 1 and whatever difficulty is set to (which I have been setting it to 10 when I have been using it).Code:y = (rand() % difficulty);