Original Post
Hi!
I am using this:
int GetRanNum(int from, int to)
{
return (rand() % to) + from;
}
But this returns sometimes a number bigger than to, the max number.
In the main function I call this:
srand (time(NULL));
So where is here the problem?
Thanks, Christian