Hi,
I have tried using the qrand() but I can't able to get the desired output. I want to generate a random set with non-repeatable alphabets. I have tried like this
int array[] = {65,66,67,68,69,70,71,72};
qsrand(time(0));
for(i=0;i < SequenceCount; i++)
{
int j = (qrand() % SequenceCount );
qDebug() << array[j];
}
int array[] = {65,66,67,68,69,70,71,72};
qsrand(time(0));
for(i=0;i < SequenceCount; i++)
{
int j = (qrand() % SequenceCount );
qDebug() << array[j];
}
To copy to clipboard, switch view to plain text mode
But in the output I see some repeatable numbers.
Bookmarks