MikeBronner
Programmer
I'm having the problem when using the following code, that it creates the same number, instead of different random numbers:
for (int i=0; i<10; i++)
{
srand((unsigned) time(NULL));
int nRandNum = rand() % (nMaxNum - nMinNum + 1) + nMinNum;
}
Could anyone PLEASE help me out with a workaround to return random numbers? Thanks ;-)
Mike B. Take Care,
Mike
for (int i=0; i<10; i++)
{
srand((unsigned) time(NULL));
int nRandNum = rand() % (nMaxNum - nMinNum + 1) + nMinNum;
}
Could anyone PLEASE help me out with a workaround to return random numbers? Thanks ;-)
Mike B. Take Care,
Mike