随机数
来源:互联网 发布:知乎的live能下载吗 编辑:程序博客网 时间:2024/04/26 19:31
TInt GetRangNum(TInt startNum,TInt endNum)
{
TTime theTime( startNum );
theTime.UniversalTime();
TInt64 randSeed( theTime.Int64() );
TInt number( startNum + Math::Rand( randSeed ) % (endNum - startNum) );
return number;
}
{
TTime theTime( startNum );
theTime.UniversalTime();
TInt64 randSeed( theTime.Int64() );
TInt number( startNum + Math::Rand( randSeed ) % (endNum - startNum) );
return number;
}