Hello everybody,
I have some numbers, for example 16, 20, 23, 40, 43
I need to generate a random number of only this numbers i have.
How could i make this on QT or C++ ??
Can somebody help me?
For the moment i have this:
Qt Code:
int max; while(count.next()) { max = count.value(0).toInt(); } //random int a = (1 + ( rand() % ( max - 1 + 1 ) ));To copy to clipboard, switch view to plain text mode
Bookmarks