title: How to ensure that randomly generated numbers are not being repeated?
body: <blockquote>
    <p><strong>Possible Duplicates:</strong><br>
    <a href="https://stackoverflow.com/questions/196017/unique-random-numbers-in-o1">Unique (non-repeating) random numbers in O(1)?</a><br>
    <a href="https://stackoverflow.com/questions/158716/how-do-you-efficiently-generate-a-list-of-k-non-repeating-integers-between-0-and">How do you efficiently generate a list of K non-repeating integers between 0 and an upper bound N</a>  </p>
  </blockquote>
  
  
  
  <p>I want to generate random number in a certain diapason, and I must be sure, that each new number is not a duplicate of formers. One solution is to store formerly generated numbers in a container and each new number checks aginst the container. If there is such number in the container, then we generate agin, else we use and add it to the container. But with each new number this operation is becoming slower and slower. Is there any better approach, or any rand function that can work faster and ensure uniqueness of the generation?</p>
  
  <p>EDIT: Yes, there is a limit (for example from 0 to 1.000.000.000). But I want to generate 100.000 unique numbers! (Would be great if the solution will be by using Qt features.)</p>