I have a code that I am trying to add support so it can not repeat the numbers until all have been used.
each time the random_type function is used it generates a random number, which I am looking for is a way the numbers will not repeat until all have been used.
Code:
void random_type(int type, int value) {
int i;
for (i = 0; i < 10; i++) {
SelectT->type[i] += value;
}
}
int main ()
{
int randType = rand()%10;
random_type(randType, 80);
]
Example:
10,5,1,3,2,6,9,4,8,7
2,9,1,4,10,7,5,8,3,6