calculate different number when run each time
<p>i have a multimap in which there are 1000 numbers. Now i need to generate a random number. say its 560. then i will take 560th element of an array. i used rand.</p>

<pre><code>int number = 0;
int size = mmap.size();
int rand = rand() % size + 1;
</code></pre>

<p>but the problem is , i am running this program n times. each time, i am getting same number of random values. How to generate random values each time when i run the program.</p>

<pre><code>  i tried using including random library. it gave error when i compile.
</code></pre>
