OC 中获取随机数

来源:互联网 发布:面向切面编程 编辑:程序博客网 时间:2024/06/01 07:34


  srandom(time(NULL)); //此处是为了让每次生成的随机数不同


  int  rand = random() % 7;

0 0
原创粉丝点击