如何写一个算法,它在一台上能每次产生一个随机并且唯一的序列?
解决方案 »
- 在Activex控件发布到网页中,如何获取“OBJECT”标记的“DATA”属性中指定包含的文件,再给程序调用?
- 关于MSDN。
- 我做的俄罗斯方块,带老板键和保存功能..
- 如何一行行读TXT文件?
- 能设置recvfrom阻塞的时间吗
- 如何在制作的.chm帮助里加入图片
- 本人不懂。NET,想问个问题
- 写过发短信程序或了解的高手进来,高分奉送哟~~~~~
- 位运算 高手指点
- VC insert into数据到SQL数据库,timestamp,uniqueidentifier(UUID)和decimal(23, 10)数据怎么初始化?
- 同一个源程序文件中能不能同时用两个时钟啊?我是放在不同的线程中的.谢谢
- 请问如何修改另外某个程序里的CEdit 文本框里的内容?
The GetTickCount function retrieves the number of milliseconds that have elapsed since the system was started. It is limited to the resolution of the system timer. If you need a higher resolution timer, use amultimedia timer or a high-resolution timer. 用 GetTickCount 的确最简单
或者先随机产生一个数,再查找是否有重复的,有就再产生一次。
CoCreateGuid我觉得比GetTickCount更可靠一点,毕竟用COM的人这么多,经得起考验。如果要求不是很严格的话,GetTickCount比较好,比较方便。