Greetings,
This is my second post till now. Thanks for all the advice given to me for the first post.
Now I'm having problem with generating random numbers. I know if we want to generate a random number, we can use:
int tempNUM = rand();
But, once I execute the program, the generated number is always similar, and I found this from the internet. It says need to add this line to make the numbers generated differently:
srand((unsigned )time(0));
When I add that line, my result is like hell.. Could someone please kindly enlighten me. Thank you
This is my second post till now. Thanks for all the advice given to me for the first post.
Now I'm having problem with generating random numbers. I know if we want to generate a random number, we can use:
int tempNUM = rand();
But, once I execute the program, the generated number is always similar, and I found this from the internet. It says need to add this line to make the numbers generated differently:
srand((unsigned )time(0));
When I add that line, my result is like hell.. Could someone please kindly enlighten me. Thank you
Comment