Hi,
I have a function gen_graph() which calls the rand() function to generate number sequence and output the sequence into a file, and my main function has such a structure:
1 2 3 4 5 6 7 8 9 10
int main()
{
srand( time( 0 ) );
for( size_t i = 0 ; i != 100 ; ++i )
{
...
gen_gdraph();
...
}
}
after execution, i got 100 files, but all the files are exactly the same!!! Why?
How can i get 100 different files? Thanks.