anyway, here is just a sample source that will output 1000 random values using my alternate technique.
Code:
/* I assume you do realize that the difference between the minimum random value and the maximum random value is at least 1000 inclusively since you want a 1000 different random values.
also note that the array will take up quite some memory.
this is not the best algorithm but it will do. I did this quickly out of scratch without compiling it so errors may exist. */
#include<iostream.h>
#include<stdlib.h>
#include<time.h>
int main(void)
{
srand(unsigned(time(NULL))); using time as seed
int array[1000];
//for this example, I will use the random values from 0 to 999.
for(int x=0; x<=999; x++)
{
array[x]=x;
}
//shuffle up the array
int rand_value, temp_value;
for(x=0; x<=999; x++)
{
// just a swap technique with rand()
rand_value = rand()%1000;
temp_value = array[x];
array[x] = array[rand_value];
array[rand_value] = temp_value;
}
// output values to screen
// (change this if you don't want it to output to screen)
for(x=0; x<=999; x++)
{
cout<<array[x]<<" ";
}
return 0;
}