use not Num_Array.push_back(i); but something like Num_Array.push_back(rand());
This fails the requirement, because it's possible that rand() will return the same number at least twice in the nine calls.
The only true way to do it is to shuffle the possible values, like shuffling a deck of cards, rather than randomly picking a card from a huge pile and hoping there are no duplicates.
I am doing what you suggested .
how do I generate 9 random numbers that do not repeat?
Posted Today, 04:35 PM
What's the question?
It looks like you did. Try telling us what you expected to happen, and what actually happened, and be as specific as possible.
Edited by Ectara, 21 May 2013 - 10:07 PM.