So, I have a typical system time-seeded number generator and I need it to exclude the number it generates from generated again in the same run (it's a simple Q&A program essentially, where the number generated corresponds to the array index of the question asked. Without this, I run into the problem of the same question being asked multiple times in the same run). Any help?
1 2 3
int secret;
srand((unsigned)time(0));
secret = rand() % 6;