quark

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2012年2月22日

摘要: 最近,在编写自己呃数独游戏过程中,遇到需要生成一些随机但连续的数字序列的需求。当时,为了尽快实现功能,临时写了一个凑合着用。现在有时间,写一个通用的,生成随机但连续数的序列的函数,当然原理很简单。// generate a random number list length of which is size;// the range of numbers is 0 to size-1;bool CreateRandomSequenceNumbers(int size, int* randomSequence){ if ( size <= 0 || (randomSequence == N 阅读全文
posted @ 2012-02-22 15:48 QuarkZ 阅读(565) 评论(0) 推荐(0)