I know this has been asked here many times before, but anyway...
I'm creating a game in C++ and need to generate random numbers. I know about
1 2 3 4 5 6
int main()
{
srand(time(NULL)); //Initialises randomiser or sum' like that
int x=rand%10; //Generates from 0-9
cout<<x;
}
Now, I need the best way to generate random numbers. Do I call "srand(time(NULL));" every time I want to randomise? What is the best method to generate a nearly perfect random number?
Please note, I may need to call a randomiser more than once a second, so taking second as seed (I believe that's what srand(time(NULL)); does).