I was trying to use the rand() function but it seems not to be able to run without being in debug and stepping through my program so I was wondering if anyone has a simple way to generate a number from 0-5 below is what i was trying to do.
int number (){
srand ( time(NULL) ); //initialize the random seed
int RandIndex = rand() % 6; //generates a random number between 0 and 5
numbers = RandIndex;
return numbers;
}