I\'d like to make a number generator that does not repeat the number it has given out already (C++).
All I know is:
int randomgenerator(){ int ran
//non repeating random number generator for (int derepeater = 0; derepeater < arraySize; derepeater++) { for (int j = 0; j < arraySize; j++) { for (int i = arraySize; i > 0; i--) { if (Compare[j] == Compare[i] && j != i) { Compare[j] = rand() % upperlimit + 1; } } } }