Random number in a array?
C++
1 2 3 4 5
|
srand(time(0));
int Rnum = rand()%5+1;
int guessArray[]={Rnum};
|
would this be right if I was making a guessing game with random number vs me putting numbers in like int guessArray[]={1,2,3.....}
I don't know why you'd need an array if you are guessing one random number?
Topic archived. No new replies allowed.