How do I generate totally a random number at a time?
<p>I want to create 3 random number at a time (simultaneously). However, they returned me the same numbers at a time even though they are actually random. Example:</p>

<pre><code>------------------------
Variable:   A   B   C
------------------------
Time 1  :   5   5   5
Time 2  :   3   3   3
Time 3  :   9   9   9
------------------------
</code></pre>

<p>They suppose to be different numbers at all. From the observation, I can see that my code can only pick a random number at a time (interval 1 second). Here is my generator code that I'm using:</p>

<pre><code>unsigned int CMain::GenerateRandom(int min, int max)
{
    srand((unsigned)time(0)); 
    unsigned int random_integer; 
    int lowest = min, highest = max; 
    int range = (highest - lowest) + 1;

    random_integer = lowest + int(range * rand() / (RAND_MAX + 1.0));

    return random_integer;
}
</code></pre>

<p>How could I generate a totally random numbers at a time? Please help.</p>

<p>Thank you.</p>
