srand(time(NULL)) 是什么意思?
程序代码:#include <ctime>
#include <iostream>
using namespace std;
int main()
{
int i;
int rd;
srand(time(NULL));
rd = rand()%10;
cout << rd <<endl;
system("pause");
return 0;
}
帮忙解释一下代码,越详细越好。









