i have a small problem with the random function in the thread!
Code:
int rand_func()
{
srand((unsigned int)time(NULL));
int output = rand()%3;
return output;
}
void test(void *id)
{
int n = rand_func();
}
help me please, i need a random number from 0 to 3..
the second n should not be equal to the first n!
if possible I would like to know the reason
sorry for my english *-*






