mardi 31 août 2021

How to make rand function display same number 1 time c++ [duplicate]

I'm trying to make it so that in my To-Do list, the tasks can only be called once and can't be called again. I put the tasks in a vector, and then randomly gets one of them with the rand() function. However, the rand() statement can use the same number twice. How do I make it so it can't, or is there a different way?




Aucun commentaire:

Enregistrer un commentaire