cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
bool function
bool function
Dec 7, 2013 at 8:42pm UTC
ayo
(6)
I'm a bit confused on how would i use the bool function in this situation to make sure rand() doesnt generate two of the same numbers. Any ideas :3?
https://gist.github.com/anonymous/6fa4ab206c9670505914
Dec 7, 2013 at 8:46pm UTC
giblit
(3750)
You should assign the random value to a temp variable then assign it to the array only if it is not already in the array.
Topic archived. No new replies allowed.